mirror of
https://codeberg.org/matkoniecz/list_how_openstreetmap_can_be_improved_with_alltheplaces_data.git
synced 2025-05-13 05:03:09 +02:00
move test code skeleton into place where reuse is more likely
This commit is contained in:
parent
c31e31c739
commit
55a7107128
2 changed files with 12 additions and 10 deletions
|
@ -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())
|
||||
|
|
10
matcher.py
10
matcher.py
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue