Skip to content

Commit

Permalink
lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
fcurella committed Oct 15, 2024
1 parent 53995d1 commit 2f69eec
Show file tree
Hide file tree
Showing 5 changed files with 253 additions and 251 deletions.
1 change: 1 addition & 0 deletions faker/providers/job/ka_GE/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .. import Provider as BaseProvider


class Provider(BaseProvider):
# Sourse: https://www.ganmarteba.ge/
jobs = [
Expand Down
18 changes: 9 additions & 9 deletions tests/providers/test_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
from faker.providers.color.he_IL import Provider as HeILColorProvider
from faker.providers.color.hy_AM import Provider as HyAmColorProvider
from faker.providers.color.id_ID import Provider as IdIdColorProvider
from faker.providers.color.ka_GE import Provider as KaGEColorProvider
from faker.providers.color.sk_SK import Provider as SkSkColorProvider
from faker.providers.color.vi_VN import Provider as ViVNColorProvider
from faker.providers.color.ka_GE import Provider as KaGEColorProvider


class TestColorProvider:
Expand Down Expand Up @@ -447,33 +447,33 @@ def test_safe_color_name(self, faker, num_samples):
assert safe_color_name in IdIdColorProvider.safe_colors


class TestViVn:
"""Test vi_VN color provider methods"""
class TestKaGe:
"""Test Ka_GE color provider methods"""

def test_color_name(self, faker, num_samples):
for _ in range(num_samples):
color_name = faker.color_name()
assert isinstance(color_name, str)
assert color_name in ViVNColorProvider.all_colors.keys()
assert color_name in KaGEColorProvider.all_colors.keys()

def test_safe_color_name(self, faker, num_samples):
for _ in range(num_samples):
safe_color_name = faker.safe_color_name()
assert isinstance(safe_color_name, str)
assert safe_color_name in ViVNColorProvider.safe_colors
assert safe_color_name in KaGEColorProvider.safe_colors


class TestKaGe:
"""Test Ka_GE color provider methods"""
class TestViVn:
"""Test vi_VN color provider methods"""

def test_color_name(self, faker, num_samples):
for _ in range(num_samples):
color_name = faker.color_name()
assert isinstance(color_name, str)
assert color_name in KaGEColorProvider.all_colors.keys()
assert color_name in ViVNColorProvider.all_colors.keys()

def test_safe_color_name(self, faker, num_samples):
for _ in range(num_samples):
safe_color_name = faker.safe_color_name()
assert isinstance(safe_color_name, str)
assert safe_color_name in KaGEColorProvider.safe_colors
assert safe_color_name in ViVNColorProvider.safe_colors
20 changes: 10 additions & 10 deletions tests/providers/test_date_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -1375,37 +1375,37 @@ def test_traditional_month(self):
assert month in JaJpProvider.TRADITIONAL_MONTH_NAMES.values()


class TestViVn(unittest.TestCase):
"""Tests date_time in the vi_VN locale"""
class TestKaGe(unittest.TestCase):
"""Test Ka_GE date_time provider methods"""

def setUp(self):
self.fake = Faker("vi_VN")
self.fake = Faker("Ka_GE")
Faker.seed(0)

def test_day(self):
day = self.fake.day_of_week()
assert isinstance(day, str)
assert day in ViVNProvider.DAY_NAMES.values()
assert day in KaGeProvider.DAY_NAMES.values()

def test_month(self):
month = self.fake.month_name()
assert isinstance(month, str)
assert month in ViVNProvider.MONTH_NAMES.values()
assert month in KaGeProvider.MONTH_NAMES.values()


class TestKaGe(unittest.TestCase):
"""Test Ka_GE date_time provider methods"""
class TestViVn(unittest.TestCase):
"""Tests date_time in the vi_VN locale"""

def setUp(self):
self.fake = Faker("Ka_GE")
self.fake = Faker("vi_VN")
Faker.seed(0)

def test_day(self):
day = self.fake.day_of_week()
assert isinstance(day, str)
assert day in KaGeProvider.DAY_NAMES.values()
assert day in ViVNProvider.DAY_NAMES.values()

def test_month(self):
month = self.fake.month_name()
assert isinstance(month, str)
assert month in KaGeProvider.MONTH_NAMES.values()
assert month in ViVNProvider.MONTH_NAMES.values()
84 changes: 42 additions & 42 deletions tests/providers/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ def test_job(self, faker, num_samples):
assert faker.job() in JobProvider.jobs


class TestAzAz:
"""Test az_AZ job provider"""

def test_job(self, faker, num_samples):
for _ in range(num_samples):
assert faker.job() in AzAzJobProvider.jobs


class TestCsCz:
"""Test cs_CZ job provider"""

Expand All @@ -36,28 +44,36 @@ def test_job(self, faker, num_samples):
assert job in CsCzJobProvider.jobs


class TestAzAz:
"""Test az_AZ job provider"""
class TestDeDe:
"""Test de_DE job provider"""

def test_job(self, faker, num_samples):
for _ in range(num_samples):
assert faker.job() in AzAzJobProvider.jobs
assert faker.job() in DeDeJobProvider.jobs


class TestJaJp:
"""Test ja_JP job provider"""
class TestElGr:
"""Test el_GR job provider"""

def test_job(self, faker, num_samples):
for _ in range(num_samples):
assert faker.job() in JaJpJobProvider.jobs
assert faker.job() in ElGrJobProvider.jobs


class TestKoKr:
"""Test ko_KR job provider"""
class TestEsEs:
"""Test es job provider"""

def test_job(self, faker, num_samples):
for _ in range(num_samples):
assert faker.job() in KoKrJobProvider.jobs
assert faker.job() in EsEsJobProvider.jobs


class TestFrFr:
"""Test fr_FR job provider"""

def test_job(self, faker, num_samples):
for _ in range(num_samples):
assert faker.job() in FrFrJobProvider.jobs


class TestHuHu:
Expand All @@ -76,36 +92,38 @@ def test_job(self, faker, num_samples):
assert faker.job() in HyAmJobProvider.jobs


class TestDeDe:
"""Test de_DE job provider"""
class TestJaJp:
"""Test ja_JP job provider"""

def test_job(self, faker, num_samples):
for _ in range(num_samples):
assert faker.job() in DeDeJobProvider.jobs
assert faker.job() in JaJpJobProvider.jobs


class TestFrFr:
"""Test fr_FR job provider"""
class TestKaGe:
"""Test ka_GE job provider"""

def test_job(self, faker, num_samples):
for _ in range(num_samples):
assert faker.job() in FrFrJobProvider.jobs
job = faker.job()
assert isinstance(job, str)
assert job in ViVNJobProvider.jobs


class TestElGr:
"""Test el_GR job provider"""
class TestKoKr:
"""Test ko_KR job provider"""

def test_job(self, faker, num_samples):
for _ in range(num_samples):
assert faker.job() in ElGrJobProvider.jobs
assert faker.job() in KoKrJobProvider.jobs


class TestEsEs:
"""Test es job provider"""
class TestPtBr:
"""Test pt_BR job provider"""

def test_job(self, faker, num_samples):
for _ in range(num_samples):
assert faker.job() in EsEsJobProvider.jobs
assert faker.job() in PtBrJobProvider.jobs


class TestPtPt:
Expand All @@ -116,12 +134,11 @@ def test_job(self, faker, num_samples):
assert faker.job() in PtPtJobProvider.jobs


class TestPtBr:
"""Test pt_BR job provider"""
class TestRoRo:
"""Test Ro_RO job provider"""

def test_job(self, faker, num_samples):
for _ in range(num_samples):
assert faker.job() in PtBrJobProvider.jobs
assert faker.job() in RoRoJobProvider.jobs


class TestSkSk:
Expand All @@ -148,13 +165,6 @@ def test_job(self, faker, num_samples):
assert faker.job() in TrTrJobProvider.jobs


class TestRoRo:
"""Test Ro_RO job provider"""

def test_job(self, faker, num_samples):
assert faker.job() in RoRoJobProvider.jobs


class TestViVn:
"""Test vi_VN job provider"""

Expand All @@ -163,13 +173,3 @@ def test_job(self, faker, num_samples):
job = faker.job()
assert isinstance(job, str)
assert job in ViVNJobProvider.jobs


class TestKaGe:
"""Test ka_GE job provider"""

def test_job(self, faker, num_samples):
for _ in range(num_samples):
job = faker.job()
assert isinstance(job, str)
assert job in ViVNJobProvider.jobs
Loading

0 comments on commit 2f69eec

Please sign in to comment.