<commit_before># coding: utf8

import geocoder

location = 'Ottawa, Ontario'
city = 'Ottawa'
ottawa = (45.4215296, -75.6971930)


def test_bing():
    g = geocoder.bing(location)
    assert g.ok
    assert g.city == city
    osm_count, fields_count = g.debug()[0]
    assert osm_count >= 3
    assert fields_count >= 12


def test_bing_details():
    details = {
        'adminDistrict': 'Ontario',
        'locality': 'Ottawa'
    }

    g = geocoder.bing(None, **details, method='details')
    assert g.ok
    assert g.city == city
    osm_count, fields_count = g.debug()[0]
    assert osm_count >= 3
    assert fields_count >= 12

    details = {
        'addressLine': '6912 Route 8',
        'adminDistrict': 'Northumberland',
        'countryRegion': 'CA',
        'locality': 'Ludlow'
    }

    g = geocoder.bing(None, **details, method='details')
    assert g.ok
    osm_count, fields_count = g.debug()[0]
    assert osm_count >= 3
    assert fields_count >= 12<commit_msg>Syntax error fix for bing tests (Python <= 3.4)<commit_after># coding: utf8

import geocoder

location = 'Ottawa, Ontario'
city = 'Ottawa'
ottawa = (45.4215296, -75.6971930)


def test_bing():
    g = geocoder.bing(location)
    assert g.ok
    assert g.city == city
    osm_count, fields_count = g.debug()[0]
    assert osm_count >= 3
    assert fields_count >= 12


def test_bing_details():
    details = {
        'adminDistrict': 'Ontario',
        'locality': 'Ottawa'
    }

    g = geocoder.bing(None, method='details', **details)
    assert g.ok
    assert g.city == city
    osm_count, fields_count = g.debug()[0]
    assert osm_count >= 3
    assert fields_count >= 12

    details = {
        'addressLine': '6912 Route 8',
        'adminDistrict': 'Northumberland',
        'countryRegion': 'CA',
        'locality': 'Ludlow'
    }

    g = geocoder.bing(None, method='details', **details)
    assert g.ok
    osm_count, fields_count = g.debug()[0]
    assert osm_count >= 3
    assert fields_count >= 12
{'fraction_non_alphanumeric': 0.13563563563563563, 'fraction_numerical': 0.037037037037037035, 'mean_word_length': 2.7859848484848486, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6094372', 'n_tokens_mistral': 754, 'n_tokens_neox': 674, 'n_words': 170}