1
0
Fork 0

move test code skeleton into place where reuse is more likely

This commit is contained in:
Mateusz Konieczny 2025-02-05 12:54:42 +01:00
parent c31e31c739
commit 55a7107128
2 changed files with 12 additions and 10 deletions

View file

@ -239,14 +239,6 @@ def is_osm_and_atp_still_matching(entry):
return matches[0].match_distance == 0
if __name__ == '__main__':
test_template = """ def test_matching_on_word_XXXXXXXXXXXX_is_not_safe(self):
atp_tags = {
}
osm_tags = {}
self.assertEqual(self.this_tag_lists_match(atp_tags, osm_tags), False)
for test skeleton in test_matching_logic.py (these is a common issue found by this validator)
"""
print(test_template)
print(matcher.word_matching_block_test_template())
main()
print(test_template)
print(matcher.word_matching_block_test_template())

View file

@ -93,6 +93,16 @@ def common_shared_name_parts():
"markets", "service", "sports", "blue", "kids", "united", "inns", "fresh", "first", "america", "national", "go", "cash", "factory", "just", "one", "farms", 'big', 'dairy', 'clean',
]
def word_matching_block_test_template():
return """
def test_matching_on_word_XXXXXXXXXXXX_is_not_safe(self):
atp_tags = {
}
osm_tags = {}
self.assertEqual(self.this_tag_lists_match(atp_tags, osm_tags), False)
for test skeleton in test_matching_logic.py (these is a common issue found by this validator)
"""
def get_name_sources(atp_tags):
name_sources = set()