tests package

Submodules

tests.test_extractor module

class tests.test_extractor.TestExtractor(methodName='runTest')[source]

Bases: unittest.case.TestCase

test Extractor

check(places, expectedList)[source]

check the places for begin non empty and having at least the expected List of elements

Parameters:
  • places (Places) – the places to check
  • expectedList (list) – the list of elements to check
setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

testExtractorFromText()[source]

test different texts for getting geo context information

testExtractorFromUrl()[source]

test the extractor

testGeograpyIssue32()[source]

test https://github.com/ushahidi/geograpy/issues/32

testGetGeoPlace()[source]

test geo place handling

testIssue10()[source]

test https://github.com/somnathrakshit/geograpy3/issues/10 Add ISO country code

testIssue7()[source]

test https://github.com/somnathrakshit/geograpy3/issues/7 disambiguating countries

testIssue9()[source]

test https://github.com/somnathrakshit/geograpy3/issues/9 [BUG]AttributeError: ‘NoneType’ object has no attribute ‘name’ on “Pristina, Kosovo”

testStackOverflow54721435()[source]

see https://stackoverflow.com/questions/54721435/unable-to-extract-city-names-from-a-text-using-geograpypython

testStackoverflow43322567()[source]

see https://stackoverflow.com/questions/43322567

testStackoverflow54077973()[source]

see https://stackoverflow.com/questions/54077973/geograpy3-library-for-extracting-the-locations-in-the-text-gives-unicodedecodee

testStackoverflow54712198()[source]

see https://stackoverflow.com/questions/54712198/not-only-extracting-places-from-a-text-but-also-other-names-in-geograpypython

testStackoverflow55548116()[source]

see https://stackoverflow.com/questions/55548116/geograpy3-library-is-not-working-properly-and-give-traceback-error

testStackoverflow62152428()[source]

see https://stackoverflow.com/questions/62152428/extracting-country-information-from-description-using-geograpy?noredirect=1#comment112899776_62152428

tests.test_locator module

Created on 2020-09-19

@author: wf

class tests.test_locator.TestLocator(methodName='runTest')[source]

Bases: unittest.case.TestCase

test the Locator class from the location module

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

testExamples()[source]

test examples

testGeolite2Cities()[source]

test the locs.db cache for cities

testHasData()[source]

check has data and populate functionality

testIsoRegexp()[source]

test regular expression for iso codes

testWordCount()[source]

test the word count

tests.test_places module

class tests.test_places.TestPlaces(methodName='runTest')[source]

Bases: unittest.case.TestCase

test Places

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

testPlaces()[source]

test places

tests.test_prefixtree module

Created on 2020-09-20

@author: wf

class tests.test_prefixtree.TestPrefixTree(methodName='runTest')[source]

Bases: unittest.case.TestCase

test prefix tree algorithm

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

testPrefixTree()[source]

test the prefix Tree

Module contents