<commit_before># https://www.openstreetmap.org/way/417097119
# https://www.openstreetmap.org/relation/3002741
#   type=route, route=bus, network="", ref=23
# https://www.openstreetmap.org/relation/32312
#   type=route, route=bicycle, network=lcn, ref=50
# https://www.openstreetmap.org/relation/1976278
#   type=route, route=road, network=US:CA, ref=35
assert_has_feature(
    16, 10469, 25340, 'roads',
    { 'id': 417097119,
      'network': 'US:CA',
      'shield_text': '35',
      'bicycle_network': 'lcn',
      'bicycle_shield_text': '50',
      'bus_network': type(None),
      'bus_shield_text': '23' })

# Jackson St. SF, part of trolley-bus route 3
# http://www.openstreetmap.org/way/225516711
# http://www.openstreetmap.org/relation/2980505
#   outbound
# http://www.openstreetmap.org/relation/2980504
#   inbound
assert_has_feature(
    16, 10477, 25327, 'roads',
    { 'id': 225516711,
      'bus_network': type(None),
      'bus_shield_text': '3',
      'all_bus_networks': [None, None],
      'all_bus_shield_texts': ['3', '3'] })

# make sure the all_* lists are gone by zoom 12 on major roads, but the "most
# important" network & shield text remain until.
assert_has_feature(
    10, 163, 395, 'roads',
    { 'bus_network': type(None),
      'bus_shield_text': '3' })
assert_no_matching_feature(
    10, 163, 395, 'roads',
    { 'all_bus_networks': None })
assert_no_matching_feature(
    10, 163, 395, 'roads',
    { 'all_bus_shield_texts': None })<commit_msg>Be less specific about which bus shield we test for, it's enough that there is one.<commit_after># https://www.openstreetmap.org/way/417097119
# https://www.openstreetmap.org/relation/3002741
#   type=route, route=bus, network="", ref=23
# https://www.openstreetmap.org/relation/32312
#   type=route, route=bicycle, network=lcn, ref=50
# https://www.openstreetmap.org/relation/1976278
#   type=route, route=road, network=US:CA, ref=35
assert_has_feature(
    16, 10469, 25340, 'roads',
    { 'id': 417097119,
      'network': 'US:CA',
      'shield_text': '35',
      'bicycle_network': 'lcn',
      'bicycle_shield_text': '50',
      'bus_network': type(None),
      'bus_shield_text': '23' })

# Jackson St. SF, part of trolley-bus route 3
# http://www.openstreetmap.org/way/225516711
# http://www.openstreetmap.org/relation/2980505
#   outbound
# http://www.openstreetmap.org/relation/2980504
#   inbound
assert_has_feature(
    16, 10477, 25327, 'roads',
    { 'id': 225516711,
      'bus_network': type(None),
      'bus_shield_text': '3',
      'all_bus_networks': [None, None],
      'all_bus_shield_texts': ['3', '3'] })

# make sure the all_* lists are gone by zoom 12 on major roads, but the "most
# important" network & shield text remain until.
#
# note that it doesn't matter what the bus shield is - that's data-dependent.
# for the purposes of the test, we only care that there _is_ one.
assert_has_feature(
    10, 163, 395, 'roads',
    { 'bus_network': type(None),
      'bus_shield_text': None })
assert_no_matching_feature(
    10, 163, 395, 'roads',
    { 'all_bus_networks': None })
assert_no_matching_feature(
    10, 163, 395, 'roads',
    { 'all_bus_shield_texts': None })
{'fraction_non_alphanumeric': 0.15454831602140384, 'fraction_numerical': 0.0853005980484734, 'mean_word_length': 3.9195046439628483, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 14, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7136021', 'n_tokens_mistral': 1372, 'n_tokens_neox': 1148, 'n_words': 262}