Skip to content

Commit

Permalink
Add more entries in cs_CZ's geo (#1942)
Browse files Browse the repository at this point in the history
  • Loading branch information
george0st authored Nov 1, 2023
1 parent 56cbd57 commit 3b98ea5
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 0 deletions.
83 changes: 83 additions & 0 deletions faker/providers/geo/cs_CZ/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,87 @@ class Provider(GeoProvider):
("50.119855", "16.069446", "Žďár nad Orlicí", "CZ", "Europe/Prague"),
("49.564288", "15.939507", "Žďár nad Sázavou", "CZ", "Europe/Prague"),
("49.696057", "15.813706", "Ždírec nad Doubravou", "CZ", "Europe/Prague"),
("50.139886", "16.064472", "Albrechtice nad Orlicí", "CZ", "Europe/Prague"),
("49.253337", "14.302929", "Albrechtice nad Vltavou", "CZ", "Europe/Prague"),
("50.762400", "15.275813", "Albrechtice v Jizerských horách", "CZ", "Europe/Prague"),
("50.223983", "12.195113", "Aš", "CZ", "Europe/Prague"),
("50.482406", "14.941596", "Bakov nad Jizerou", "CZ", "Europe/Prague"),
("49.452124", "14.608319", "Balkova Lhota", "CZ", "Europe/Prague"),
("50.164080", "16.547862", "Bartošovice v Orlických horách", "CZ", "Europe/Prague"),
("49.245527", "17.426201", "Bařice-Velké Těšany", "CZ", "Europe/Prague"),
("50.083561", "12.838429", "Bečov nad Teplou", "CZ", "Europe/Prague"),
("49.956809", "15.079916", "Bečváry", "CZ", "Europe/Prague"),
("49.295336", "14.468202", "Bechyně", "CZ", "Europe/Prague"),
("49.591261", "12.717718", "Bělá nad Radbuzou", "CZ", "Europe/Prague"),
("50.501314", "14.804290", "Bělá pod Bezdězem", "CZ", "Europe/Prague"),
("50.164036", "17.196677", "Bělá pod Pradědem", "CZ", "Europe/Prague"),
("50.198081", "15.942805", "Běleč nad Orlicí", "CZ", "Europe/Prague"),
("49.668757", "17.317289", "Bělkovice-Lašťany", "CZ", "Europe/Prague"),
("50.289261", "14.824612", "Benátky nad Jizerou", "CZ", "Europe/Prague"),
("49.709629", "16.975180", "Bílá Lhota", "CZ", "Europe/Prague"),
("50.444749", "15.741120", "Bílá Třemešná", "CZ", "Europe/Prague"),
("49.364950", "16.647855", "Blansko", "CZ", "Europe/Prague"),
("49.525208", "13.302442", "Borovy", "CZ", "Europe/Prague"),
("50.409844", "12.924571", "Boží Dar", "CZ", "Europe/Prague"),
("49.888057", "17.882754", "Branka u Opavy", "CZ", "Europe/Prague"),
("49.835396", "12.741203", "Brod nad Tichou", "CZ", "Europe/Prague"),
("48.753240", "16.882617", "Břeclav", "CZ", "Europe/Prague"),
("49.644277", "16.518096", "Březová nad Svitavou", "CZ", "Europe/Prague"),
("49.904148", "14.411028", "Březová-Oleško", "CZ", "Europe/Prague"),
("49.795210", "17.629792", "Budišov nad Budišovkou", "CZ", "Europe/Prague"),
("50.404377", "14.126018", "Budyně nad Ohří", "CZ", "Europe/Prague"),
("49.042267", "17.100961", "Bukovany", "CZ", "Europe/Prague"),
("50.604834", "15.401976", "Bystrá nad Jizerou", "CZ", "Europe/Prague"),
("49.551061", "17.037775", "Čechy pod Kosířem", "CZ", "Europe/Prague"),
("50.080411", "16.144089", "Čermná nad Orlicí", "CZ", "Europe/Prague"),
("49.941659", "14.806890", "Černé Voděrady", "CZ", "Europe/Prague"),
("49.810991", "14.928256", "Český Šternberk", "CZ", "Europe/Prague"),
("49.747144", "18.623896", "Český Těšín", "CZ", "Europe/Prague"),
("50.438699", "13.908578", "Děčany", "CZ", "Europe/Prague"),
("50.171283", "13.554483", "Děkov", "CZ", "Europe/Prague"),
("50.147821", "15.641146", "Dobřenice", "CZ", "Europe/Prague"),
("49.304851", "16.060208", "Dolní Heřmanice", "CZ", "Europe/Prague"),
("49.486182", "14.797204", "Dolní Hrachovice", "CZ", "Europe/Prague"),
("50.982619", "14.286956", "Dolní Poustevna", "CZ", "Europe/Prague"),
("50.438436", "16.151339", "Dolní Radechová", "CZ", "Europe/Prague"),
("50.080232", "13.475770", "Drahouš", "CZ", "Europe/Prague"),
("49.591902", "18.358605", "Frýdlant nad Ostravicí", "CZ", "Europe/Prague"),
("50.652357", "15.158867", "Frýdštejn", "CZ", "Europe/Prague"),
("50.665963", "15.089960", "Hodkovice nad Mohelkou", "CZ", "Europe/Prague"),
("49.406486", "16.777804", "Holštejn", "CZ", "Europe/Prague"),
("49.057721", "13.558075", "Horská Kvilda", "CZ", "Europe/Prague"),
("49.530286", "12.944527", "Horšovský Týn", "CZ", "Europe/Prague"),
("50.852892", "14.844658", "Hrádek nad Nisou", "CZ", "Europe/Prague"),
("49.971920", "13.646002", "Chříč", "CZ", "Europe/Prague"),
("49.094184", "15.893408", "Jaroměřice nad Rokytnou", "CZ", "Europe/Prague"),
("49.189995", "15.067440", "Jarošov nad Nežárkou", "CZ", "Europe/Prague"),
("50.755788", "15.263030", "Jiřetín pod Bukovou", "CZ", "Europe/Prague"),
("50.874552", "14.575190", "Jiřetín pod Jedlovou", "CZ", "Europe/Prague"),
("49.045476", "17.407042", "Kostelany nad Moravou", "CZ", "Europe/Prague"),
("50.184587", "14.954085", "Kostomlaty nad Labem", "CZ", "Europe/Prague"),
("50.383135", "14.333177", "Kostomlaty pod Řípem", "CZ", "Europe/Prague"),
("50.774549", "14.933501", "Kryštofovo Údolí", "CZ", "Europe/Prague"),
("50.499571", "13.136207", "Kryštofovy Hamry", "CZ", "Europe/Prague"),
("50.768777", "14.678722", "Kunratice u Cvikova", "CZ", "Europe/Prague"),
("49.695269", "15.277827", "Ledeč nad Sázavou", "CZ", "Europe/Prague"),
("49.304675", "17.958094", "Lhota u Vsetína", "CZ", "Europe/Prague"),
("49.613125", "15.413664", "Lipnice nad Sázavou", "CZ", "Europe/Prague"),
("49.526832", "17.586743", "Lipník nad Bečvou", "CZ", "Europe/Prague"),
("49.602226", "17.065499", "Náměšť na Hané", "CZ", "Europe/Prague"),
("49.205556", "16.155845", "Náměšť nad Oslavou", "CZ", "Europe/Prague"),
("49.561543", "16.074288", "Nové Město na Moravě", "CZ", "Europe/Prague"),
("50.344662", "16.151571", "Nové Město nad Metují", "CZ", "Europe/Prague"),
("50.925011", "15.229539", "Nové Město pod Smrkem", "CZ", "Europe/Prague"),
("49.325143", "16.168556", "Osová Bítýška", "CZ", "Europe/Prague"),
("49.953112", "12.779206", "Ovesné Kladruby", "CZ", "Europe/Prague"),
("50.160370", "14.825129", "Přerov nad Labem", "CZ", "Europe/Prague"),
("50.315762", "15.796171", "Račice nad Trotinou", "CZ", "Europe/Prague"),
("49.276006", "16.872942", "Račice-Pístovice", "CZ", "Europe/Prague"),
("49.630522", "17.328172", "Samotišky", "CZ", "Europe/Prague"),
("49.143644", "15.877648", "Výčapy", "CZ", "Europe/Prague"),
("49.842785", "14.884454", "Xaverov", "CZ", "Europe/Prague"),
("49.511965", "17.431217", "Zábeštní Lhota", "CZ", "Europe/Prague"),
("49.046302", "13.899419", "Žárovná", "CZ", "Europe/Prague"),
("49.610734", "15.735236", "Žižkovo Pole", "CZ", "Europe/Prague"),
("49.873077", "15.858205", "Žumberk", "CZ", "Europe/Prague"),
)
16 changes: 16 additions & 0 deletions tests/providers/test_geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,22 @@ def test_location_on_land_coords_only(self):
assert Decimal(loc[0]) # Should be able to cast first two elements of tuple to Decimal
assert Decimal(loc[1])

class TestCsCz(unittest.TestCase):

Check failure on line 82 in tests/providers/test_geo.py

View workflow job for this annotation

GitHub Actions / flake8

expected 2 blank lines, found 1
def setUp(self):
self.fake = Faker("cs_CZ")
Faker.seed(0)

def test_location_on_land(self):
loc = self.fake.location_on_land()
assert isinstance(loc, tuple)
assert len(loc) == 5
assert Decimal(loc[0]) # Should be able to cast first two elements of tuple to Decimal
assert Decimal(loc[1])
assert isinstance(loc[2], str) # Place is a string
assert isinstance(loc[3], str) # Country code is a string
assert len(loc[3]) == 2 # Country code is two letters
assert isinstance(loc[4], str) # Timezone is a string


class TestCsCz(unittest.TestCase):

Check failure on line 99 in tests/providers/test_geo.py

View workflow job for this annotation

GitHub Actions / flake8

redefinition of unused 'TestCsCz' from line 82
def setUp(self):
Expand Down

0 comments on commit 3b98ea5

Please sign in to comment.