Add failing test to demonstrate bug #8
GitHub Actions / Test Results
failed
Nov 19, 2024 in 0s
1 fail, 31 pass in 2m 53s
32 tests 31 ✅ 2m 53s ⏱️
1 suites 0 💤
1 files 1 ❌
Results for commit e1099a6.
Annotations
Check warning on line 0 in tests.hdx.location.test_country.TestCountry
github-actions / Test Results
test_use_live_default (tests.hdx.location.test_country.TestCountry) failed
test-results.xml [took 0s]
Raw output
AssertionError: assert 'UZB' is None
+ where 'UZB' = get_iso3_country_code('UZBEKISTAN')
+ where get_iso3_country_code = Country.get_iso3_country_code
self = <location.test_country.TestCountry object at 0x7f0e8c717260>
def test_use_live_default(self):
Country.set_use_live_default(True)
assert Country._use_live is True
Country.set_use_live_default(False)
assert Country._use_live is False
# We should now be able to load from local data without setting use_live=False
Country.set_ocha_path(
script_dir_plus_file("Countries_UZB_Deleted.csv", TestCountry)
)
> assert Country.get_iso3_country_code("UZBEKISTAN") is None
E AssertionError: assert 'UZB' is None
E + where 'UZB' = get_iso3_country_code('UZBEKISTAN')
E + where get_iso3_country_code = Country.get_iso3_country_code
tests/hdx/location/test_country.py:703: AssertionError
Loading