Repository: joke2k/faker
Pull request #1248 (2020-08-25 11:07:22)

Test Suite Housekeeping (Part 4)
### What does this change

Just another round of pytestifying. There were quite a lot of changes to master since the last batch, and I think a force push was applied to the master branch since the 4.1.1 release, so I am submitting this now before things become difficult to rebase.

Related to #1162 


fcurella: Thank you so much! ✨ 

Patch:
diff --git a/faker/providers/bank/ru_RU/__init__.py b/faker/providers/bank/ru_RU/__init__.py
index affe1a9c..868d75c9 100644
--- a/faker/providers/bank/ru_RU/__init__.py
+++ b/faker/providers/bank/ru_RU/__init__.py
@@ -17,7 +17,7 @@ class Provider(BankProvider):
     )
 
     department_code_formats = (
-        '0#', '1#', '2#', '3#', ' 4#', '5#', '6#', '7#', '8#', '9#',
+        '0#', '1#', '2#', '3#', '4#', '5#', '6#', '7#', '8#', '9#',
     )
 
     credit_organization_code_formats = (


Test patch:
diff --git a/tests/providers/test_address.py b/tests/providers/test_address.py
index e705f359..c5b71f23 100644
--- a/tests/providers/test_address.py
+++ b/tests/providers/test_address.py
@@ -1,1151 +1,1278 @@
 import re
-import unittest
 
-from ukpostcodeparser.parser import parse_uk_postcode
-
-from faker import Faker
-from faker.providers.address.de_AT import Provider as DeAtProvider
-from faker.providers.address.de_DE import Provider as DeProvider
-from faker.providers.address.el_GR import Provider as GrProvider
-from faker.providers.address.en_AU import Provider as EnAuProvider
-from faker.providers.address.en_CA import Provider as EnCaProvider
-from faker.providers.address.en_US import Provider as EnUsProvider
-from faker.providers.address.es_ES import Provider as EsEsProvider
-from faker.providers.address.es_MX import Provider as EsMxProvider
-from faker.providers.address.fa_IR import Provider as IrProvider
-from faker.providers.address.fi_FI import Provider as FiProvider
-from faker.providers.address.fr_FR import Provider as FrFrProvider
-from faker.providers.address.hy_AM import Provider as HyAmProvider
-from faker.providers.address.ja_JP import Provider as JaProvider
-from faker.providers.address.ne_NP import Provider as NeProvider
-from faker.providers.address.pt_PT import Provider as PtPtProvider
-
-
-class TestBaseProvider(unittest.TestCase):
-    """ Tests addresses in the base provider """
-
-    def setUp(self):
-        self.fake = Faker('')
-        Faker.seed(0)
-
-    def test_alpha_2_country_codes(self):
-        country_code = self.fake.country_code(representation='alpha-2')
-        assert len(country_code) == 2
-        assert country_code.isalpha()
-
-    def test_alpha_2_country_codes_as_default(self):
-        country_code = self.fake.country_code()
-        assert len(country_code) == 2
-        assert country_code.isalpha()
-
-    def test_alpha_3_country_codes(self):
-        country_code = self.fake.country_code(representation='alpha-3')
-        assert len(country_code) == 3
-        assert country_code.isalpha()
-
-    def test_bad_country_code_representation(self):
-        with self.assertRaises(ValueError):
-            self.fake.country_code(representation='hello')
-
-
-class TestAr_AA(unittest.TestCase):
-    """ Tests addresses in the ar_AA locale """
-
-    def setUp(self):
-        self.fake = Faker('ar_AA')
-        Faker.seed(0)
-
-    def test_alpha_2_country_codes(self):
-        country_code = self.fake.country_code(representation='alpha-2')
-        assert len(country_code) == 2
-        assert country_code.isalpha()
-
-    def test_alpha_2_country_codes_as_default(self):
-        country_code = self.fake.country_code()
-        assert len(country_code) == 2
-        assert country_code.isalpha()
-
-    def test_alpha_3_country_codes(self):
-        country_code = self.fake.country_code(representation='alpha-3')
-        assert len(country_code) == 3
-        assert country_code.isalpha()
-
-    def test_bad_country_code_representation(self):
-        with self.assertRaises(ValueError):
-            self.fake.country_code(representation='hello')
-
-
-class TestCsCZ(unittest.TestCase):
-    """ Tests in addresses in the cs_CZ locale """
-
-    def setUp(self):
-        self.fake = Faker('cs_CZ')
-        Faker.seed(0)
-
-    def test_street_suffix_short(self):
-        street_suffix_short = self.fake.street_suffix_short()
-        assert isinstance(street_suffix_short, str)
-
-    def test_street_suffix_long(self):
-        street_suffix_long = self.fake.street_suffix_long()
-        assert isinstance(street_suffix_long, str)
-
-    def test_city_name(self):
-        city = self.fake.city_name()
-        assert isinstance(city, str)
-
-    def test_street_name(self):
-        street_name = self.fake.street_name()
-        assert isinstance(street_name, str)
-
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
-
-    def test_postcode(self):
-        postcode = self.fake.postcode()
-        assert isinstance(postcode, str)
-
-    def test_city_with_postcode(self):
-        city_with_postcode = self.fake.city_with_postcode()
-        assert isinstance(city_with_postcode, str)
-
-
-class TestDeAT(unittest.TestCase):
-    """ Tests in addresses in the de_AT locale """
-
-    def setUp(self):
-        self.fake = Faker('de_AT')
-        Faker.seed(0)
-
-    def test_city(self):
-        city = self.fake.city()
-        assert isinstance(city, str)
-        assert city in DeAtProvider.cities
-
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
-        assert state in DeAtProvider.states
-
-    def test_street_suffix_short(self):
-        street_suffix_short = self.fake.street_suffix_short()
-        assert isinstance(street_suffix_short, str)
-        assert street_suffix_short in DeAtProvider.street_suffixes_short
-
-    def test_street_suffix_long(self):
-        street_suffix_long = self.fake.street_suffix_long()
-        assert isinstance(street_suffix_long, str)
-        assert street_suffix_long in DeAtProvider.street_suffixes_long
-
-    def test_country(self):
-        country = self.fake.country()
-        assert isinstance(country, str)
-        assert country in DeAtProvider.countries
-
-    def test_postcode(self):
-        postcode = self.fake.postcode()
-        assert re.match(r"\d{4}", postcode)
-
-    def test_city_with_postcode(self):
-        city_with_postcode = self.fake.city_with_postcode()
-        assert isinstance(city_with_postcode, str)
-
-
-class TestDeDE(unittest.TestCase):
-    """ Tests in addresses in the de_DE locale """
-
-    def setUp(self):
-        self.fake = Faker('de_DE')
-        Faker.seed(0)
-
-    def test_city(self):
-        city = self.fake.city()
-        assert isinstance(city, str)
-        assert city in DeProvider.cities
-
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
-        assert state in DeProvider.states
-
-    def test_street_suffix_short(self):
-        street_suffix_short = self.fake.street_suffix_short()
-        assert isinstance(street_suffix_short, str)
-        assert street_suffix_short in DeProvider.street_suffixes_short
-
-    def test_street_suffix_long(self):
-        street_suffix_long = self.fake.street_suffix_long()
-        assert isinstance(street_suffix_long, str)
-        assert street_suffix_long in DeProvider.street_suffixes_long
-
-    def test_country(self):
-        country = self.fake.country()
-        assert isinstance(country, str)
-        assert country in DeProvider.countries
-
-    def test_city_with_postcode(self):
-        city_with_postcode = self.fake.city_with_postcode()
-        assert isinstance(city_with_postcode, str)
-
-
-class TestElGR(unittest.TestCase):
-    """ Tests addresses in the el_GR locale """
-
-    def setUp(self):
-        self.fake = Faker('el_GR')
-        Faker.seed(0)
-
-    def test_line_address(self):
-        address = self.fake.line_address()
-        assert isinstance(address, str)
-
-    def test_street_prefix_short(self):
-        street_prefix_short = self.fake.street_prefix_short()
-        assert isinstance(street_prefix_short, str)
-        assert street_prefix_short in GrProvider.street_prefixes_short
-
-    def test_street_prefix_long(self):
-        street_prefix_long = self.fake.street_prefix_long()
-        assert isinstance(street_prefix_long, str)
-        assert street_prefix_long in GrProvider.street_prefixes_long
-
-    def test_street(self):
-        street = self.fake.street()
-        assert isinstance(street, str)
-        assert street in GrProvider.localities
-
-    def test_city(self):
-        city = self.fake.city()
-        assert isinstance(city, str)
-        assert city in GrProvider.cities
-
-    def test_region(self):
-        region = self.fake.region()
-        assert isinstance(region, str)
-        assert region in GrProvider.regions
-
-
-class TestEnAU(unittest.TestCase):
-    """ Tests addresses in the en_AU locale """
-
-    def setUp(self):
-        self.fake = Faker('en_AU')
-        Faker.seed(0)
-
-    def test_postcode(self):
-        for _ in range(100):
-            postcode = self.fake.postcode()
-            assert re.match(r"\d{4}", postcode)
-
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
-        assert state in EnAuProvider.states
-
-    def test_city_prefix(self):
-        city_prefix = self.fake.city_prefix()
-        assert isinstance(city_prefix, str)
-        assert city_prefix in EnAuProvider.city_prefixes
-
-    def test_state_abbr(self):
-        state_abbr = self.fake.state_abbr()
-        assert isinstance(state_abbr, str)
-        assert state_abbr in EnAuProvider.states_abbr
-        assert state_abbr.isupper()
-
-
-class TestEnNZ(unittest.TestCase):
-    """ Tests addresses in the en_NZ locale """
-
-    def setUp(self):
-        self.fake = Faker('en_NZ')
-        Faker.seed(0)
-
-    def test_state(self):
-        # No states in New Zealand
-        state = self.fake.state()
-        assert state == ''
-
-    def test_postcode(self):
-        for _ in range(100):
-            postcode = self.fake.postcode()
-            assert re.match(r"\d{4}", postcode)
-
-
-class TestEnCA(unittest.TestCase):
-    """ Tests addresses in en_CA locale """
-
-    def setUp(self):
-        self.fake = Faker('en_CA')
-        Faker.seed(0)
-        self.valid_postcode_letter_re = r'[{}]'.format(
-            ''.join(EnCaProvider.postal_code_letters))
-        self.valid_postcode_re = r"{0}[0-9]{0} ?[0-9]{0}[0-9]".format(
-            self.valid_postcode_letter_re)
-
-    def test_postcode(self):
-        for _ in range(100):
-            postcode = self.fake.postcode()
-            assert re.match(self.valid_postcode_re, postcode)
-
-    def test_postcode_in_province(self):
-        for province_abbr in EnCaProvider.provinces_abbr:
-            code = self.fake.postcode_in_province(province_abbr)
-            assert code[0] in EnCaProvider.provinces_postcode_prefixes[
-                province_abbr]
-
-        with self.assertRaises(Exception):
-            self.fake.postcode_in_province('XX')
-
-    def test_postalcode(self):
-        for _ in range(100):
-            postalcode = self.fake.postalcode()
-            assert re.match(self.valid_postcode_letter_re, postalcode)
-
-    def test_postal_code_letter(self):
-        postal_code_letter = self.fake.postal_code_letter()
-        assert re.match(self.valid_postcode_letter_re, postal_code_letter)
-
-    def test_province(self):
-        province = self.fake.province()
-        assert isinstance(province, str)
-        assert province in EnCaProvider.provinces
-
-    def test_province_abbr(self):
-        province_abbr = self.fake.province_abbr()
-        assert isinstance(province_abbr, str)
-        assert province_abbr in EnCaProvider.provinces_abbr
-
-    def test_city_prefix(self):
-        city_prefix = self.fake.city_prefix()
-        assert isinstance(city_prefix, str)
-        assert city_prefix in EnCaProvider.city_prefixes
-
-    def test_secondary_address(self):
-        secondary_address = self.fake.secondary_address()
-        assert isinstance(secondary_address, str)
-
-
-class TestEnGB(unittest.TestCase):
-    """ Tests addresses in the en_GB locale """
-
-    def setUp(self):
-        self.fake = Faker('en_GB')
-        Faker.seed(0)
-
-    def test_postcode(self):
-        for _ in range(100):
-            assert isinstance(parse_uk_postcode(self.fake.postcode()), tuple)
-
-    def test_county(self):
-        county = self.fake.county()
-        assert isinstance(county, str)
-
-
-class TestEnUS(unittest.TestCase):
-    """ Tests addresses in the en_US locale """
-
-    def setUp(self):
-        self.fake = Faker('en_US')
-        Faker.seed(0)
-
-    def test_city_prefix(self):
-        city_prefix = self.fake.city_prefix()
-        assert isinstance(city_prefix, str)
-        assert city_prefix in EnUsProvider.city_prefixes
-
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
-        assert state in EnUsProvider.states
-
-    def test_state_abbr(self):
-        state_abbr = self.fake.state_abbr()
-        assert isinstance(state_abbr, str)
-        states_and_territories = EnUsProvider.states_and_territories_abbr
-        assert state_abbr in states_and_territories
-
-    def test_state_abbr_no_territories(self):
-        state_abbr = self.fake.state_abbr(include_territories=False)
-        assert isinstance(state_abbr, str)
-        assert state_abbr in EnUsProvider.states_abbr
-
-    def test_postcode(self):
-        for _ in range(100):
-            code = self.fake.postcode()
-            assert re.match(r"\d{5}", code)
-
-    def test_postcode_in_state(self):
-        for state_abbr in EnUsProvider.states_abbr:
-            code = self.fake.postcode_in_state(state_abbr)
-            assert re.match(r"\d{5}", code)
-            assert int(code) >= EnUsProvider.states_postcode[state_abbr][0]
-            assert int(code) <= EnUsProvider.states_postcode[state_abbr][1]
-
-        with self.assertRaises(Exception):
-            self.fake.postcode_in_state('XX')
-
-    def test_zipcode(self):
-        for _ in range(100):
-            zipcode = self.fake.zipcode()
-            assert re.match(r"\d{5}", zipcode)
-
-    def test_zipcode_in_state(self):
-        for state_abbr in EnUsProvider.states_abbr:
-            code = self.fake.zipcode_in_state(state_abbr)
-            assert re.match(r"\d{5}", code)
-            assert int(code) >= EnUsProvider.states_postcode[state_abbr][0]
-            assert int(code) <= EnUsProvider.states_postcode[state_abbr][1]
-
-        with self.assertRaises(Exception):
-            self.fake.zipcode_in_state('XX')
-
-    def test_zipcode_plus4(self):
-        for _ in range(100):
-            zipcode_plus4 = self.fake.zipcode_plus4()
-            assert re.match(r"\d{5}(-\d{4})", zipcode_plus4)
-
-    def test_military_ship(self):
-        military_ship = self.fake.military_ship()
-        assert isinstance(military_ship, str)
-        assert military_ship in EnUsProvider.military_ship_prefix
-        assert re.match(r"[A-Z]", military_ship)
-
-    def test_military_state(self):
-        military_state = self.fake.military_state()
-        assert isinstance(military_state, str)
-        assert military_state in EnUsProvider.military_state_abbr
-        assert re.match(r"[A-Z]", military_state)
-
-    def test_military_apo(self):
-        military_apo = self.fake.military_apo()
-        assert isinstance(military_apo, str)
-
-    def test_military_dpo(self):
-        military_dpo = self.fake.military_dpo()
-        assert isinstance(military_dpo, str)
-
-    def test_postalcode(self):
-        for _ in range(100):
-            postalcode = self.fake.postalcode()
-            assert re.match(r"\d{5}", postalcode)
-
-    def test_postalcode_in_state(self):
-        for state_abbr in EnUsProvider.states_abbr:
-            code = self.fake.postalcode_in_state(state_abbr)
-            assert re.match(r"\d{5}", code)
-            assert int(code) >= EnUsProvider.states_postcode[state_abbr][0]
-            assert int(code) <= EnUsProvider.states_postcode[state_abbr][1]
-
-        with self.assertRaises(Exception):
-            self.fake.postalcode_in_state('XX')
-
-
-class TestEsES(unittest.TestCase):
-    """ Tests in addresses in the fa_IR locale """
-
-    def setUp(self):
-        self.fake = Faker('es_ES')
-        Faker.seed(0)
-
-    def test_state_name(self):
-        state_name = self.fake.state_name()
-        assert isinstance(state_name, str)
-        assert state_name in EsEsProvider.states
-
-    def test_street_prefix(self):
-        street_prefix = self.fake.street_prefix()
-        assert isinstance(street_prefix, str)
-        assert street_prefix in EsEsProvider.street_prefixes
-
-    def test_secondary_address(self):
-        secondary_address = self.fake.secondary_address()
-        assert isinstance(secondary_address, str)
-
-    def test_regions(self):
-        region = self.fake.region()
-        assert isinstance(region, str)
-        assert region in EsEsProvider.regions
-
-        # Spanish regions, also known as "autonomous communities"
-        autonomous_community = self.fake.autonomous_community()
-        assert isinstance(autonomous_community, str)
-        assert autonomous_community in EsEsProvider.regions
-
-
-class TestEsMX(unittest.TestCase):
-    """ Tests the addresses in the es_MX locale """
-
-    def setUp(self):
-        self.fake = Faker('es_MX')
-        Faker.seed(0)
-
-    def test_city_prefix(self):
-        city_prefix = self.fake.city_prefix()
-        assert isinstance(city_prefix, str)
-        assert city_prefix in EsMxProvider.city_prefixes
-
-    def test_city_suffix(self):
-        city_suffix = self.fake.city_suffix()
-        assert isinstance(city_suffix, str)
-        assert city_suffix in EsMxProvider.city_suffixes
-
-    def test_city_adjective(self):
-        city_adjective = self.fake.city_adjective()
-        assert isinstance(city_adjective, str)
-        assert city_adjective in EsMxProvider.city_adjectives
+import pytest
 
-    def test_street_prefix(self):
-        street_prefix = self.fake.street_prefix()
-        assert isinstance(street_prefix, str)
-        assert street_prefix in EsMxProvider.street_prefixes
-
-    def test_secondary_address(self):
-        secondary_address = self.fake.secondary_address()
-        assert isinstance(secondary_address, str)
-
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
-
-    def test_state_abbr(self):
-        state_abbr = self.fake.state_abbr()
-        assert isinstance(state_abbr, str)
-
-
-class TestFaIR(unittest.TestCase):
-    """ Tests in addresses in the fa_IR locale """
-
-    def setUp(self):
-        self.fake = Faker('fa_IR')
-        Faker.seed(0)
-
-    def test_city_prefix(self):
-        city_prefix = self.fake.city_prefix()
-        assert isinstance(city_prefix, str)
-        assert city_prefix in IrProvider.city_prefixes
-
-    def test_secondary_address(self):
-        secondary_address = self.fake.secondary_address()
-        assert isinstance(secondary_address, str)
-
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
-        assert state in IrProvider.states
-
-
-class TestFrFR(unittest.TestCase):
-    """ Tests addresses in the fr_FR locale """
-
-    def setUp(self):
-        self.fake = Faker('fr_FR')
-        Faker.seed(0)
-
-    def test_street_prefix(self):
-        street_prefix = self.fake.street_prefix()
-        assert isinstance(street_prefix, str)
-        assert street_prefix in FrFrProvider.street_prefixes
-
-    def test_city_prefix(self):
-        city_prefix = self.fake.city_prefix()
-        assert isinstance(city_prefix, str)
-        assert city_prefix in FrFrProvider.city_prefixes
-
-    def test_region(self):
-        region = self.fake.region()
-        assert isinstance(region, str)
-        assert region in FrFrProvider.regions
-
-    def test_department(self):
-        department = self.fake.department()
-        assert isinstance(department, tuple)
-        assert department in FrFrProvider.departments
-
-    def test_department_name(self):
-        department_name = self.fake.department_name()
-        assert isinstance(department_name, str)
-
-    def test_department_number(self):
-        department_number = self.fake.department_number()
-        assert isinstance(department_number, str)
-
-
-class TestHeIL(unittest.TestCase):
-    """ Tests addresses in the he_IL locale """
-
-    def setUp(self):
-        self.fake = Faker('he_IL')
-        Faker.seed(0)
-
-    def test_city_name(self):
-        city_name = self.fake.city_name()
-        assert isinstance(city_name, str)
-
-    def test_street_title(self):
-        street_title = self.fake.street_title()
-        assert isinstance(street_title, str)
-
-
-class TestHiIN(unittest.TestCase):
-    """ Tests addresses in the hi_IN locale """
-
-    def setUp(self):
-        self.fake = Faker('hi_IN')
-        Faker.seed(0)
-
-    def test_city_name(self):
-        city_name = self.fake.city_name()
-        assert isinstance(city_name, str)
-
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
-
-
-class TestTaIN(unittest.TestCase):
-    """ Tests addresses in the ta_IN locale """
-
-    def setUp(self):
-        self.fake = Faker('ta_IN')
-        Faker.seed(0)
-
-    def test_city_name(self):
-        city_name = self.fake.city_name()
-        assert isinstance(city_name, str)
-
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
-
-
-class TestFiFI(unittest.TestCase):
-    """ Tests in addresses in the fi_FI locale """
-
-    def setUp(self):
-        self.fake = Faker('fi_FI')
-        Faker.seed(0)
-
-    def test_city(self):
-        city = self.fake.city()
-        assert isinstance(city, str)
-        assert city in FiProvider.cities
-
-    def test_street_suffix(self):
-        suffix = self.fake.street_suffix()
-        assert isinstance(suffix, str)
-        assert suffix in FiProvider.street_suffixes
-
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
-        assert state in FiProvider.states
-
-
-class TestHRHR(unittest.TestCase):
-    """ Tests addresses in the hr_HR locale """
+from ukpostcodeparser.parser import parse_uk_postcode
 
-    def setUp(self):
-        self.fake = Faker('hr_HR')
-        Faker.seed(0)
+from faker.providers.address.cs_CZ import Provider as CsCzAddressProvider
+from faker.providers.address.de_AT import Provider as DeAtAddressProvider
+from faker.providers.address.de_DE import Provider as DeDeAddressProvider
+from faker.providers.address.el_GR import Provider as ElGrAddressProvider
+from faker.providers.address.en_AU import Provider as EnAuAddressProvider
+from faker.providers.address.en_CA import Provider as EnCaAddressProvider
+from faker.providers.address.en_GB import Provider as EnGbAddressProvider
+from faker.providers.address.en_PH import Provider as EnPhAddressProvider
+from faker.providers.address.en_US import Provider as EnUsAddressProvider
+from faker.providers.address.es_ES import Provider as EsEsAddressProvider
+from faker.providers.address.es_MX import Provider as EsMxAddressProvider
+from faker.providers.address.fa_IR import Provider as FaIrAddressProvider
+from faker.providers.address.fi_FI import Provider as FiFiAddressProvider
+from faker.providers.address.fr_FR import Provider as FrFrAddressProvider
+from faker.providers.address.he_IL import Provider as HeIlAddressProvider
+from faker.providers.address.hi_IN import Provider as HiInAddressProvider
+from faker.providers.address.hr_HR import Provider as HrHrAddressProvider
+from faker.providers.address.hy_AM import Provider as HyAmAddressProvider
+from faker.providers.address.ja_JP import Provider as JaJpAddressProvider
+from faker.providers.address.ne_NP import Provider as NeNpAddressProvider
+from faker.providers.address.no_NO import Provider as NoNoAddressProvider
+from faker.providers.address.pt_BR import Provider as PtBrAddressProvider
+from faker.providers.address.pt_PT import Provider as PtPtAddressProvider
+from faker.providers.address.ru_RU import Provider as RuRuAddressProvider
+from faker.providers.address.ta_IN import Provider as TaInAddressProvider
+from faker.providers.address.zh_CN import Provider as ZhCnAddressProvider
+from faker.providers.address.zh_TW import Provider as ZhTwAddressProvider
+
+
+class TestBaseProvider:
+    """Test address provider methods"""
+
+    def test_alpha_2_country_codes(self, faker, num_samples):
+        for _ in range(num_samples):
+            country_code = faker.country_code(representation='alpha-2')
+            assert len(country_code) == 2
+            assert country_code.isalpha()
+
+    def test_alpha_2_country_codes_as_default(self, faker, num_samples):
+        for _ in range(num_samples):
+            country_code = faker.country_code()
+            assert len(country_code) == 2
+            assert country_code.isalpha()
+
+    def test_alpha_3_country_codes(self, faker, num_samples):
+        for _ in range(num_samples):
+            country_code = faker.country_code(representation='alpha-3')
+            assert len(country_code) == 3
+            assert country_code.isalpha()
+
+    def test_bad_country_code_representation(self, faker, num_samples):
+        for _ in range(num_samples):
+            with pytest.raises(ValueError):
+                faker.country_code(representation='hello')
+
+
+class TestCsCz:
+    """Test cs_CZ address provider methods"""
+
+    def test_street_suffix_short(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_suffix_short = faker.street_suffix_short()
+            assert isinstance(street_suffix_short, str)
+            assert street_suffix_short in CsCzAddressProvider.street_suffixes_short
+
+    def test_street_suffix_long(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_suffix_long = faker.street_suffix_long()
+            assert isinstance(street_suffix_long, str)
+            assert street_suffix_long in CsCzAddressProvider.street_suffixes_long
+
+    def test_city_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            city = faker.city_name()
+            assert isinstance(city, str)
+            assert city in CsCzAddressProvider.cities
+
+    def test_street_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_name = faker.street_name()
+            assert isinstance(street_name, str)
+            assert street_name in CsCzAddressProvider.streets
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in CsCzAddressProvider.states
+
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert re.fullmatch(r'\d{3} \d{2}', postcode)
+
+    def test_city_with_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_with_postcode = faker.city_with_postcode()
+            assert isinstance(city_with_postcode, str)
+            match = re.fullmatch(r'\d{3} \d{2} (?P<city>.*)', city_with_postcode)
+            assert match.group('city') in CsCzAddressProvider.cities
+
+
+class TestDeAt:
+    """Test de_AT address provider methods"""
+
+    def test_city(self, faker, num_samples):
+        for _ in range(num_samples):
+            city = faker.city()
+            assert isinstance(city, str)
+            assert city in DeAtAddressProvider.cities
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in DeAtAddressProvider.states
+
+    def test_street_suffix_short(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_suffix_short = faker.street_suffix_short()
+            assert isinstance(street_suffix_short, str)
+            assert street_suffix_short in DeAtAddressProvider.street_suffixes_short
+
+    def test_street_suffix_long(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_suffix_long = faker.street_suffix_long()
+            assert isinstance(street_suffix_long, str)
+            assert street_suffix_long in DeAtAddressProvider.street_suffixes_long
+
+    def test_country(self, faker, num_samples):
+        for _ in range(num_samples):
+            country = faker.country()
+            assert isinstance(country, str)
+            assert country in DeAtAddressProvider.countries
+
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert re.fullmatch(r'\d{4}', postcode)
+
+    def test_city_with_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_with_postcode = faker.city_with_postcode()
+            assert isinstance(city_with_postcode, str)
+            match = re.fullmatch(r'\d{4} (?P<city>.*)', city_with_postcode)
+            assert match.groupdict()['city'] in DeAtAddressProvider.cities
+
+
+class TestDeDe:
+    """Test de_DE address provider methods"""
+
+    def test_city(self, faker, num_samples):
+        for _ in range(num_samples):
+            city = faker.city()
+            assert isinstance(city, str)
+            assert city in DeDeAddressProvider.cities
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in DeDeAddressProvider.states
+
+    def test_street_suffix_short(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_suffix_short = faker.street_suffix_short()
+            assert isinstance(street_suffix_short, str)
+            assert street_suffix_short in DeDeAddressProvider.street_suffixes_short
+
+    def test_street_suffix_long(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_suffix_long = faker.street_suffix_long()
+            assert isinstance(street_suffix_long, str)
+            assert street_suffix_long in DeDeAddressProvider.street_suffixes_long
+
+    def test_country(self, faker, num_samples):
+        for _ in range(num_samples):
+            country = faker.country()
+            assert isinstance(country, str)
+            assert country in DeDeAddressProvider.countries
+
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert re.fullmatch(r'\d{5}', postcode)
+
+    def test_city_with_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_with_postcode = faker.city_with_postcode()
+            assert isinstance(city_with_postcode, str)
+            match = re.fullmatch(r'\d{5} (?P<city>.*)', city_with_postcode)
+            assert match.groupdict()['city'] in DeDeAddressProvider.cities
+
+
+class TestElGr:
+    """Test el_GR address provider methods"""
+
+    def test_line_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            address = faker.line_address()
+            assert isinstance(address, str)
+
+    def test_street_prefix_short(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_prefix_short = faker.street_prefix_short()
+            assert isinstance(street_prefix_short, str)
+            assert street_prefix_short in ElGrAddressProvider.street_prefixes_short
+
+    def test_street_prefix_long(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_prefix_long = faker.street_prefix_long()
+            assert isinstance(street_prefix_long, str)
+            assert street_prefix_long in ElGrAddressProvider.street_prefixes_long
+
+    def test_street(self, faker, num_samples):
+        for _ in range(num_samples):
+            street = faker.street()
+            assert isinstance(street, str)
+            assert street in ElGrAddressProvider.localities
+
+    def test_city(self, faker, num_samples):
+        for _ in range(num_samples):
+            city = faker.city()
+            assert isinstance(city, str)
+            assert city in ElGrAddressProvider.cities
+
+    def test_region(self, faker, num_samples):
+        for _ in range(num_samples):
+            region = faker.region()
+            assert isinstance(region, str)
+            assert region in ElGrAddressProvider.regions
+
+
+class TestEnAu:
+    """Test en_AU address provider methods"""
+
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert re.fullmatch(r'\d{4}', postcode)
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in EnAuAddressProvider.states
+
+    def test_city_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_prefix = faker.city_prefix()
+            assert isinstance(city_prefix, str)
+            assert city_prefix in EnAuAddressProvider.city_prefixes
+
+    def test_state_abbr(self, faker, num_samples):
+        for _ in range(num_samples):
+            state_abbr = faker.state_abbr()
+            assert isinstance(state_abbr, str)
+            assert state_abbr in EnAuAddressProvider.states_abbr
+            assert state_abbr.isupper()
+
+
+class TestEnNz:
+    """Test en_NZ address provider methods"""
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            # No states in New Zealand
+            assert faker.state() == ''
+
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert re.fullmatch(r"\d{4}", postcode)
 
-    def test_city_name(self):
-        city_name = self.fake.city_name()
-        assert isinstance(city_name, str)
 
-    def test_street_name(self):
-        street_name = self.fake.street_name()
-        assert isinstance(street_name, str)
+class TestEnCa:
+    """Test en_CA address provider methods"""
 
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
+    valid_postcode_letter_re = r'[{}]'.format(
+            ''.join(EnCaAddressProvider.postal_code_letters))
+    valid_postcode_re = r"{0}[0-9]{0} ?[0-9]{0}[0-9]".format(valid_postcode_letter_re)
 
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert re.fullmatch(self.valid_postcode_re, postcode)
+
+    def test_postcode_in_province(self, faker, num_samples):
+        for _ in range(num_samples):
+            for province_abbr in EnCaAddressProvider.provinces_abbr:
+                code = faker.postcode_in_province(province_abbr)
+                assert code[0] in EnCaAddressProvider.provinces_postcode_prefixes[province_abbr]
+                with pytest.raises(Exception):
+                    faker.postcode_in_province('XX')
+
+    def test_postalcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postalcode = faker.postalcode()
+            assert isinstance(postalcode, str)
+            assert re.fullmatch(self.valid_postcode_re, postalcode)
+
+    def test_postal_code_letter(self, faker, num_samples):
+        for _ in range(num_samples):
+            postal_code_letter = faker.postal_code_letter()
+            assert isinstance(postal_code_letter, str)
+            assert re.fullmatch(self.valid_postcode_letter_re, postal_code_letter)
+
+    def test_province(self, faker, num_samples):
+        for _ in range(num_samples):
+            province = faker.province()
+            assert isinstance(province, str)
+            assert province in EnCaAddressProvider.provinces
+
+    def test_province_abbr(self, faker, num_samples):
+        for _ in range(num_samples):
+            province_abbr = faker.province_abbr()
+            assert isinstance(province_abbr, str)
+            assert province_abbr in EnCaAddressProvider.provinces_abbr
+
+    def test_city_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_prefix = faker.city_prefix()
+            assert isinstance(city_prefix, str)
+            assert city_prefix in EnCaAddressProvider.city_prefixes
+
+    def test_secondary_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            secondary_address = faker.secondary_address()
+            assert isinstance(secondary_address, str)
+            assert re.fullmatch(r'(?:Apt\.|Suite) \d{3}', secondary_address)
+
+
+class TestEnGb:
+    """Test en_GB address provider methods"""
+
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert isinstance(parse_uk_postcode(faker.postcode()), tuple)
+
+    def test_county(self, faker, num_samples):
+        for _ in range(num_samples):
+            county = faker.county()
+            assert isinstance(county, str)
+            assert county in EnGbAddressProvider.counties
+
+
+class TestEnUS:
+    """Test en_US address provider methods"""
+
+    def test_city_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_prefix = faker.city_prefix()
+            assert isinstance(city_prefix, str)
+            assert city_prefix in EnUsAddressProvider.city_prefixes
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in EnUsAddressProvider.states
+
+    def test_state_abbr(self, faker, num_samples):
+        for _ in range(num_samples):
+            state_abbr = faker.state_abbr()
+            assert isinstance(state_abbr, str)
+            states_and_territories = EnUsAddressProvider.states_and_territories_abbr
+            assert state_abbr in states_and_territories
+
+    def test_state_abbr_no_territories(self, faker, num_samples):
+        for _ in range(num_samples):
+            state_abbr = faker.state_abbr(include_territories=False)
+            assert isinstance(state_abbr, str)
+            assert state_abbr in EnUsAddressProvider.states_abbr
+
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            code = faker.postcode()
+            assert isinstance(code, str) and len(code) == 5
+            assert 501 <= int(code) <= 99950
+
+    def test_postcode_in_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            for state_abbr in EnUsAddressProvider.states_abbr:
+                code = faker.postcode_in_state(state_abbr)
+                assert re.fullmatch(r'\d{5}', code)
+                assert int(code) >= EnUsAddressProvider.states_postcode[state_abbr][0]
+                assert int(code) <= EnUsAddressProvider.states_postcode[state_abbr][1]
+
+        with pytest.raises(Exception):
+            faker.postcode_in_state('XX')
+
+    def test_zipcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            zipcode = faker.zipcode()
+            assert isinstance(zipcode, str) and len(zipcode) == 5
+            assert 501 <= int(zipcode) <= 99950
+
+    def test_zipcode_in_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            for state_abbr in EnUsAddressProvider.states_abbr:
+                code = faker.zipcode_in_state(state_abbr)
+                assert re.fullmatch(r"\d{5}", code)
+                assert int(code) >= EnUsAddressProvider.states_postcode[state_abbr][0]
+                assert int(code) <= EnUsAddressProvider.states_postcode[state_abbr][1]
+
+        with pytest.raises(Exception):
+            faker.zipcode_in_state('XX')
+
+    def test_zipcode_plus4(self, faker, num_samples):
+        for _ in range(num_samples):
+            zipcode_plus4 = faker.zipcode_plus4()
+            assert isinstance(zipcode_plus4, str)
+            zipcode, plus4 = zipcode_plus4.split('-')
+            assert 501 <= int(zipcode) <= 99950
+            assert 1 <= int(plus4) <= 9999
+
+    def test_military_ship(self, faker, num_samples):
+        for _ in range(num_samples):
+            military_ship = faker.military_ship()
+            assert isinstance(military_ship, str)
+            assert military_ship in EnUsAddressProvider.military_ship_prefix
+
+    def test_military_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            military_state = faker.military_state()
+            assert isinstance(military_state, str)
+            assert military_state in EnUsAddressProvider.military_state_abbr
+
+    def test_military_apo(self, faker, num_samples):
+        for _ in range(num_samples):
+            military_apo = faker.military_apo()
+            assert isinstance(military_apo, str)
+            assert re.fullmatch(r'PSC \d{4}, Box \d{4}', military_apo)
+
+    def test_military_dpo(self, faker, num_samples):
+        for _ in range(num_samples):
+            military_dpo = faker.military_dpo()
+            assert isinstance(military_dpo, str)
+            assert re.fullmatch(r'Unit \d{4} Box \d{4}', military_dpo)
+
+    def test_postalcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postalcode = faker.postalcode()
+            assert isinstance(postalcode, str) and len(postalcode) == 5
+            assert 501 <= int(postalcode) <= 99950
+
+    def test_postalcode_in_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            for state_abbr in EnUsAddressProvider.states_abbr:
+                code = faker.postalcode_in_state(state_abbr)
+                assert re.fullmatch(r"\d{5}", code)
+                assert int(code) >= EnUsAddressProvider.states_postcode[state_abbr][0]
+                assert int(code) <= EnUsAddressProvider.states_postcode[state_abbr][1]
+
+        with pytest.raises(Exception):
+            faker.postalcode_in_state('XX')
+
+
+class TestEsEs:
+    """Test es_ES address provider methods"""
+
+    def test_state_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            state_name = faker.state_name()
+            assert isinstance(state_name, str)
+            assert state_name in EsEsAddressProvider.states
+
+    def test_street_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_prefix = faker.street_prefix()
+            assert isinstance(street_prefix, str)
+            assert street_prefix in EsEsAddressProvider.street_prefixes
+
+    def test_secondary_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            secondary_address = faker.secondary_address()
+            assert isinstance(secondary_address, str)
+            assert re.fullmatch(r'Apt\. \d{2}|Piso \d|Puerta \d', secondary_address)
+
+    def test_regions(self, faker, num_samples):
+        for _ in range(num_samples):
+            region = faker.region()
+            assert isinstance(region, str)
+            assert region in EsEsAddressProvider.regions
+
+    def test_autonomous_community(self, faker, num_samples):
+        for _ in range(num_samples):
+            # Spanish regions, also known as "autonomous communities"
+            autonomous_community = faker.autonomous_community()
+            assert isinstance(autonomous_community, str)
+            assert autonomous_community in EsEsAddressProvider.regions
+
+
+class TestEsMx:
+    """Test es_MX address provider methods"""
+
+    def test_city_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_prefix = faker.city_prefix()
+            assert isinstance(city_prefix, str)
+            assert city_prefix in EsMxAddressProvider.city_prefixes
+
+    def test_city_suffix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_suffix = faker.city_suffix()
+            assert isinstance(city_suffix, str)
+            assert city_suffix in EsMxAddressProvider.city_suffixes
+
+    def test_city_adjective(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_adjective = faker.city_adjective()
+            assert isinstance(city_adjective, str)
+            assert city_adjective in EsMxAddressProvider.city_adjectives
+
+    def test_street_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_prefix = faker.street_prefix()
+            assert isinstance(street_prefix, str)
+            assert street_prefix in EsMxAddressProvider.street_prefixes
+
+    def test_secondary_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            secondary_address = faker.secondary_address()
+            assert isinstance(secondary_address, str)
+            assert re.fullmatch(
+                r'\d{3} \d{3}|\d{3} Interior \d{3}|\d{3} Edif\. \d{3} , Depto\. \d{3}',
+                secondary_address,
+            )
+
+    def test_state(self, faker, num_samples):
+        states = [state_name for state_abbr, state_name in EsMxAddressProvider.states]
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in states
+
+    def test_state_abbr(self, faker, num_samples):
+        state_abbrs = [state_abbr for state_abbr, state_name in EsMxAddressProvider.states]
+        for _ in range(num_samples):
+            state_abbr = faker.state_abbr()
+            assert isinstance(state_abbr, str)
+            assert state_abbr in state_abbrs
+
+
+class TestFaIr:
+    """Test fa_IR address provider methods"""
+
+    def test_city_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_prefix = faker.city_prefix()
+            assert isinstance(city_prefix, str)
+            assert city_prefix in FaIrAddressProvider.city_prefixes
+
+    def test_secondary_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            secondary_address = faker.secondary_address()
+            assert isinstance(secondary_address, str)
+            assert re.fullmatch(r'(?:سوئیت|واحد) \d{3}', secondary_address)
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in FaIrAddressProvider.states
+
+
+class TestFrFr:
+    """Test fr_FR address provider methods"""
+
+    def test_street_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_prefix = faker.street_prefix()
+            assert isinstance(street_prefix, str)
+            assert street_prefix in FrFrAddressProvider.street_prefixes
+
+    def test_city_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_prefix = faker.city_prefix()
+            assert isinstance(city_prefix, str)
+            assert city_prefix in FrFrAddressProvider.city_prefixes
+
+    def test_region(self, faker, num_samples):
+        for _ in range(num_samples):
+            region = faker.region()
+            assert isinstance(region, str)
+            assert region in FrFrAddressProvider.regions
+
+    def test_department(self, faker, num_samples):
+        for _ in range(num_samples):
+            department = faker.department()
+            assert isinstance(department, tuple)
+            assert department in FrFrAddressProvider.departments
+
+    def test_department_name(self, faker, num_samples):
+        department_names = [dept_name for dept_num, dept_name in FrFrAddressProvider.departments]
+        for _ in range(num_samples):
+            department_name = faker.department_name()
+            assert isinstance(department_name, str)
+            assert department_name in department_names
+
+    def test_department_number(self, faker, num_samples):
+        department_numbers = [dept_num for dept_num, dept_name in FrFrAddressProvider.departments]
+        for _ in range(num_samples):
+            department_number = faker.department_number()
+            assert isinstance(department_number, str)
+            assert department_number in department_numbers
+
+
+class TestHeIl:
+    """Test he_IL address provider methods"""
+
+    def test_city_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_name = faker.city_name()
+            assert isinstance(city_name, str)
+            assert city_name in HeIlAddressProvider.city_names
+
+    def test_street_title(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_title = faker.street_title()
+            assert isinstance(street_title, str)
+            assert street_title in HeIlAddressProvider.street_titles
+
+
+class TestHiIn:
+    """Test hi_IN address provider methods"""
+
+    def test_city_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_name = faker.city_name()
+            assert isinstance(city_name, str)
+            assert city_name in HiInAddressProvider.cities
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in HiInAddressProvider.states
+
+
+class TestTaIn:
+    """Test ta_IN address provider methods"""
+
+    def test_city_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_name = faker.city_name()
+            assert isinstance(city_name, str)
+            assert city_name in TaInAddressProvider.cities
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in TaInAddressProvider.states
+
+
+class TestFiFi:
+    """Test fi_FI address provider methods"""
+
+    def test_city(self, faker, num_samples):
+        for _ in range(num_samples):
+            city = faker.city()
+            assert isinstance(city, str)
+            assert city in FiFiAddressProvider.cities
+
+    def test_street_suffix(self, faker, num_samples):
+        for _ in range(num_samples):
+            suffix = faker.street_suffix()
+            assert isinstance(suffix, str)
+            assert suffix in FiFiAddressProvider.street_suffixes
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in FiFiAddressProvider.states
+
+
+class TestHrHr:
+    """Test hr_HR address provider methods"""
+
+    def test_city_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_name = faker.city_name()
+            assert isinstance(city_name, str)
+            assert city_name in HrHrAddressProvider.cities
+
+    def test_street_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_name = faker.street_name()
+            assert isinstance(street_name, str)
+            assert street_name in HrHrAddressProvider.streets
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in HrHrAddressProvider.states
 
-class TestHuHU(unittest.TestCase):
-    """ Tests addresses in the hu_HU locale """
 
-    def setUp(self):
-        self.fake = Faker('hu_HU')
-        Faker.seed(0)
+class TestHuHu:
+    """Test hu_HU address provider methods"""
 
-    def test_postcode_first_digit(self):
+    def test_postcode(self, faker, num_samples):
         # Hungarian postcodes begin with 'H-' followed by 4 digits.
         # The first digit may not begin with a zero.
-        for _ in range(100):
-            pcd = self.fake.postcode()
-            assert pcd[2] > "0"
+        for _ in range(num_samples):
+            pcd = faker.postcode()
+            assert re.fullmatch(r'H-[1-9]\d{3}', pcd)
 
-    def test_street_address(self):
+    def test_street_address(self, faker, num_samples):
         """
         Tests street address.
 
         A street address must consist of a street name, a place type and a number, and end in a period point.
         """
-        address = self.fake.street_address()
-        assert address[-1] == '.'
-        # Check for correct capitalisation of place type
-        assert address.split(" ")[-2][0].islower()
-        # Check for street number format
-        assert re.match(r"\d{1,4}\.", address.split(" ")[-1])
-
-    def test_street_address_with_county(self):
+        for _ in range(num_samples):
+            address = faker.street_address()
+            assert address[-1] == '.'
+            # Check for correct capitalisation of place type
+            assert address.split(" ")[-2][0].islower()
+            # Check for street number format
+            assert re.fullmatch(r"\d{1,4}\.", address.split(" ")[-1])
+
+    def test_street_address_with_county(self, faker, num_samples):
         """Tests street address with country. A street address must be:
         - in three rows,
         - starting with a valid street address,
         - contain a valid post code,
         - contain the place name validly capitalized.
         """
-        address = self.fake.street_address_with_county()
-        # Number of rows
-        assert len(address.split("\n")) == 3
-        first, second, last = address.split("\n")
-
-        # Test street address
-        assert first[0].isupper()
-        assert first.split(" ")[-2][0].islower()
-        assert re.match(r"\d{1,4}\.", first.split(" ")[-1])
-
-        # Test county line
-        assert second.split(" ")[-1][0].islower()
-        assert second.split(" ")[0][0].isupper()
-
-        # Test postcode
-        assert re.match(r"H-[1-9]\d{3}", last.split(" ")[0])
-
-        # Test place name capitalization
-        assert last.split(" ")[-1][0].isupper()
-
-    def test_address(self):
-        """ Tests the address provider in the hu_HU locale """
-        address = self.fake.address()
-        assert isinstance(address, str)
-        address_with_county = self.fake.street_address_with_county()
-        assert isinstance(address_with_county, str)
-
-
-class TestHyAM(unittest.TestCase):
-    """ Tests addresses in the hy_AM locale """
-
-    def setUp(self):
-        self.fake = Faker('hy_AM')
-        Faker.seed(0)
-
-    def test_address(self):
-        address = self.fake.address()
-        assert isinstance(address, str)
-
-    def test_building_number(self):
-        building_number = self.fake.building_number()
-        assert isinstance(building_number, str)
-        assert len(building_number) <= 3
-
-    def test_city(self):
-        city = self.fake.city()
-        assert isinstance(city, str)
-        assert city in HyAmProvider.cities
-
-    def test_city_prefix(self):
-        city_prefix = self.fake.city_prefix()
-        assert isinstance(city_prefix, str)
-        assert city_prefix in HyAmProvider.city_prefixes
-
-    def test_city_suffix(self):
-        city_suffix = self.fake.city_suffix()
-        assert isinstance(city_suffix, str)
-
-    def test_country(self):
-        country = self.fake.country()
-        assert isinstance(country, str)
-        assert country in HyAmProvider.countries
-
-    def test_alpha_2_country_codes(self):
-        country_code = self.fake.country_code(representation='alpha-2')
-        assert len(country_code) == 2
-        assert country_code.isalpha()
-
-    def test_alpha_2_country_codes_as_default(self):
-        country_code = self.fake.country_code()
-        assert len(country_code) == 2
-        assert country_code.isalpha()
-
-    def test_alpha_3_country_codes(self):
-        country_code = self.fake.country_code(representation='alpha-3')
-        assert len(country_code) == 3
-        assert country_code.isalpha()
-
-    def test_bad_country_code_representation(self):
-        with self.assertRaises(ValueError):
-            self.fake.country_code(representation='hello')
-
-    def test_postcode(self):
-        postcode = self.fake.postcode()
-        assert isinstance(postcode, str)
-        assert re.match(r"\d{4}", postcode)
-        assert int(postcode) >= 200
-        assert int(postcode) <= 4299
-
-    def test_postcode_in_state(self):
-        for state_abbr in HyAmProvider.states_abbr:
-            code = self.fake.postcode_in_state(state_abbr)
-            assert re.match(r"\d{4}", code)
-            assert int(code) >= HyAmProvider.states_postcode[state_abbr][0]
-            assert int(code) <= HyAmProvider.states_postcode[state_abbr][1]
-
-        with self.assertRaises(Exception):
-            self.fake.postcode_in_state('XX')
-
-    def test_secondary_address(self):
-        secondary_address = self.fake.secondary_address()
-        assert isinstance(secondary_address, str)
-
-    def test_state(self):
-        state = self.fake.state()
-        assert isinstance(state, str)
-        assert state in HyAmProvider.states
-
-    def test_state_abbr(self):
-        state_abbr = self.fake.state_abbr()
-        assert isinstance(state_abbr, str)
-        assert state_abbr in HyAmProvider.states_abbr
-        assert state_abbr.isupper()
-
-    def test_street(self):
-        street = self.fake.street()
-        assert isinstance(street, str)
-        assert street in HyAmProvider.streets
-
-    def test_street_address(self):
-        street_address = self.fake.street_address()
-        assert isinstance(street_address, str)
-
-    def test_street_name(self):
-        street_name = self.fake.street_name()
-        assert isinstance(street_name, str)
-
-    def test_street_prefix(self):
-        street_prefix = self.fake.street_prefix()
-        assert isinstance(street_prefix, str)
-        assert street_prefix in HyAmProvider.street_prefixes
-
-    def test_street_suffix(self):
-        suffix = self.fake.street_suffix()
-        assert isinstance(suffix, str)
-        assert suffix in HyAmProvider.street_suffixes
-
-    def test_village(self):
-        village = self.fake.village()
-        assert isinstance(village, str)
-        assert village in HyAmProvider.villages
-
-    def test_village_prefix(self):
-        village_prefix = self.fake.village_prefix()
-        assert isinstance(village_prefix, str)
-        assert village_prefix in HyAmProvider.village_prefixes
-
-
-class TestJaJP(unittest.TestCase):
-    """ Tests addresses in the ja_JP locale """
-
-    def setUp(self):
-        self.fake = Faker('ja')
-        Faker.seed(0)
-
-    def test_address(self):
-        """ Test"""
-        country = self.fake.country()
-        assert isinstance(country, str)
-        assert country in JaProvider.countries
-
-        prefecture = self.fake.prefecture()
-        assert isinstance(prefecture, str)
-        assert prefecture in JaProvider.prefectures
-
-        city = self.fake.city()
-        assert isinstance(city, str)
-        assert city in JaProvider.cities
-
-        town = self.fake.town()
-        assert isinstance(town, str)
-        assert town in JaProvider.towns
-
-        chome = self.fake.chome()
-        assert isinstance(chome, str)
-        assert re.match(r"\d{1,2}丁目", chome)
-
-        ban = self.fake.ban()
-        assert isinstance(ban, str)
-        assert re.match(r"\d{1,2}番", ban)
-
-        gou = self.fake.gou()
-        assert isinstance(gou, str)
-        assert re.match(r"\d{1,2}号", gou)
-
-        building_name = self.fake.building_name()
-        assert isinstance(building_name, str)
-        assert building_name in JaProvider.building_names
-
-        postcode = self.fake.postcode()
-        assert isinstance(postcode, str)
-        assert re.match(r"\d{3}-\d{4}", postcode)
-
-        zipcode = self.fake.zipcode()
-        assert isinstance(zipcode, str)
-        assert re.match(r"\d{3}-\d{4}", zipcode)
-
-        address = self.fake.address()
-        assert isinstance(address, str)
+        for _ in range(num_samples):
+            address = faker.street_address_with_county()
+            # Number of rows
+            assert len(address.split("\n")) == 3
+            first, second, last = address.split("\n")
+
+            # Test street address
+            assert first[0].isupper()
+            assert first.split(" ")[-2][0].islower()
+            assert re.fullmatch(r"\d{1,4}\.", first.split(" ")[-1])
+
+            # Test county line
+            assert second.split(" ")[-1][0].islower()
+            assert second.split(" ")[0][0].isupper()
+
+            # Test postcode
+            assert re.fullmatch(r"H-[1-9]\d{3}", last.split(" ")[0])
+
+            # Test place name capitalization
+            assert last.split(" ")[-1][0].isupper()
+
+    def test_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            address = faker.address()
+            assert isinstance(address, str)
+            address_with_county = faker.street_address_with_county()
+            assert isinstance(address_with_county, str)
+
+
+class TestHyAm:
+    """Test hy_AM address provider methods"""
+
+    def test_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            address = faker.address()
+            assert isinstance(address, str)
+
+    def test_building_number(self, faker, num_samples):
+        for _ in range(num_samples):
+            building_number = faker.building_number()
+            assert isinstance(building_number, str)
+            assert 0 <= int(building_number) <= 999
+
+    def test_city(self, faker, num_samples):
+        for _ in range(num_samples):
+            city = faker.city()
+            assert isinstance(city, str)
+            assert city in HyAmAddressProvider.cities
+
+    def test_city_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_prefix = faker.city_prefix()
+            assert isinstance(city_prefix, str)
+            assert city_prefix in HyAmAddressProvider.city_prefixes
+
+    def test_country(self, faker, num_samples):
+        for _ in range(num_samples):
+            country = faker.country()
+            assert isinstance(country, str)
+            assert country in HyAmAddressProvider.countries
+
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert 200 <= int(postcode) <= 4299
+
+    def test_postcode_in_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            for state_abbr in HyAmAddressProvider.states_abbr:
+                code = faker.postcode_in_state(state_abbr)
+                assert re.fullmatch(r"\d{4}", code)
+                assert int(code) >= HyAmAddressProvider.states_postcode[state_abbr][0]
+                assert int(code) <= HyAmAddressProvider.states_postcode[state_abbr][1]
+
+        with pytest.raises(Exception):
+            faker.postcode_in_state('XX')
+
+    def test_secondary_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            secondary_address = faker.secondary_address()
+            assert isinstance(secondary_address, str)
+            assert re.fullmatch(r'բն\. \d{1,2}', secondary_address)
+
+    def test_state(self, faker, num_samples):
+        for _ in range(num_samples):
+            state = faker.state()
+            assert isinstance(state, str)
+            assert state in HyAmAddressProvider.states
+
+    def test_state_abbr(self, faker, num_samples):
+        for _ in range(num_samples):
+            state_abbr = faker.state_abbr()
+            assert isinstance(state_abbr, str)
+            assert state_abbr in HyAmAddressProvider.states_abbr
+            assert state_abbr.isupper()
+
+    def test_street(self, faker, num_samples):
+        for _ in range(num_samples):
+            street = faker.street()
+            assert isinstance(street, str)
+            assert street in HyAmAddressProvider.streets
+
+    def test_street_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_address = faker.street_address()
+            assert isinstance(street_address, str)
+
+    def test_street_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_name = faker.street_name()
+            assert isinstance(street_name, str)
+
+    def test_street_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_prefix = faker.street_prefix()
+            assert isinstance(street_prefix, str)
+            assert street_prefix in HyAmAddressProvider.street_prefixes
+
+    def test_street_suffix(self, faker, num_samples):
+        for _ in range(num_samples):
+            suffix = faker.street_suffix()
+            assert isinstance(suffix, str)
+            assert suffix in HyAmAddressProvider.street_suffixes
+
+    def test_village(self, faker, num_samples):
+        for _ in range(num_samples):
+            village = faker.village()
+            assert isinstance(village, str)
+            assert village in HyAmAddressProvider.villages
+
+    def test_village_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            village_prefix = faker.village_prefix()
+            assert isinstance(village_prefix, str)
+            assert village_prefix in HyAmAddressProvider.village_prefixes
+
+
+class TestJaJp:
+    """Test ja_JP address provider methods"""
+
+    def test_chome(self, faker, num_samples):
+        for _ in range(num_samples):
+            chome = faker.chome()
+            assert isinstance(chome, str)
+            match = re.fullmatch(r"(?P<chome_number>\d{1,2})丁目", chome)
+            assert match
+            assert 1 <= int(match.group('chome_number')) <= 42
 
+    def test_ban(self, faker, num_samples):
+        for _ in range(num_samples):
+            ban = faker.ban()
+            assert isinstance(ban, str)
+            match = re.fullmatch(r"(?P<ban_number>\d{1,2})番", ban)
+            assert match
+            assert 1 <= int(match.group('ban_number')) <= 27
 
-class TestKoKR(unittest.TestCase):
-    """ Tests addresses in the ko_KR locale """
+    def test_gou(self, faker, num_samples):
+        for _ in range(num_samples):
+            gou = faker.gou()
+            assert isinstance(gou, str)
+            match = re.fullmatch(r"(?P<gou_number>\d{1,2})号", gou)
+            assert match
+            assert 1 <= int(match.group('gou_number')) <= 20
+
+    def test_town(self, faker, num_samples):
+        for _ in range(num_samples):
+            town = faker.town()
+            assert isinstance(town, str)
+            assert town in JaJpAddressProvider.towns
+
+    def test_prefecture(self, faker, num_samples):
+        for _ in range(num_samples):
+            prefecture = faker.prefecture()
+            assert isinstance(prefecture, str)
+            assert prefecture in JaJpAddressProvider.prefectures
+
+    def test_city(self, faker, num_samples):
+        for _ in range(num_samples):
+            city = faker.city()
+            assert isinstance(city, str)
+            assert city in JaJpAddressProvider.cities
+
+    def test_country(self, faker, num_samples):
+        for _ in range(num_samples):
+            country = faker.country()
+            assert isinstance(country, str)
+            assert country in JaJpAddressProvider.countries
+
+    def test_building_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            building_name = faker.building_name()
+            assert isinstance(building_name, str)
+            assert building_name in JaJpAddressProvider.building_names
+
+    def test_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            address = faker.address()
+            assert isinstance(address, str)
+
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert re.fullmatch(r'\d{3}-\d{4}', postcode)
 
-    def setUp(self):
-        self.fake = Faker('ko_KR')
-        Faker.seed(0)
+    def test_zipcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            zipcode = faker.zipcode()
+            assert isinstance(zipcode, str)
+            assert re.fullmatch(r'\d{3}-\d{4}', zipcode)
 
-    def test_address(self):
-        postcode = self.fake.postcode()
-        assert isinstance(postcode, str)
-        assert re.match(r"\d{5}", postcode)
 
-        postal_code = self.fake.postal_code()
-        assert isinstance(postal_code, str)
-        assert re.match(r"\d{5}", postal_code)
+class TestKoKr:
+    """Test ko_KR address provider methods"""
 
-        old_postal_code = self.fake.old_postal_code()
-        assert isinstance(old_postal_code, str)
-        assert re.match(r"\d{3}-\d{3}", old_postal_code)
+    def test_old_postal_code(self, faker, num_samples):
+        for _ in range(num_samples):
+            old_postal_code = faker.old_postal_code()
+            assert isinstance(old_postal_code, str)
+            assert re.fullmatch(r'\d{3}-\d{3}', old_postal_code)
 
+    def test_postal_code(self, faker, num_samples):
+        for _ in range(num_samples):
+            postal_code = faker.postal_code()
+            assert isinstance(postal_code, str)
+            assert re.fullmatch(r'\d{5}', postal_code)
 
-class TestNeNP(unittest.TestCase):
-    """ Tests addresses in the ne_NP locale """
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert re.fullmatch(r'\d{5}', postcode)
 
-    def setUp(self):
-        self.fake = Faker('ne_NP')
-        Faker.seed(0)
 
-    def test_address(self):
-        """ Tests the street address in ne_NP locale """
-        country = self.fake.country()
-        assert isinstance(country, str)
-        assert country in NeProvider.countries
+class TestNeNp:
+    """Test ne_NP address provider methods"""
 
-        district = self.fake.district()
-        assert isinstance(district, str)
-        assert district in NeProvider.districts
+    def test_district(self, faker, num_samples):
+        for _ in range(num_samples):
+            district = faker.district()
+            assert isinstance(district, str)
+            assert district in NeNpAddressProvider.districts
 
-        city = self.fake.city()
-        assert isinstance(city, str)
-        assert city in NeProvider.cities
+    def test_city(self, faker, num_samples):
+        for _ in range(num_samples):
+            city = faker.city()
+            assert isinstance(city, str)
+            assert city in NeNpAddressProvider.cities
 
+    def test_country(self, faker, num_samples):
+        for _ in range(num_samples):
+            country = faker.country()
+            assert isinstance(country, str)
+            assert country in NeNpAddressProvider.countries
 
-class TestNoNO(unittest.TestCase):
-    """ Tests the street address in no_NO locale """
 
-    def setUp(self):
-        self.fake = Faker('no_NO')
-        Faker.seed(0)
+class TestNoNo:
+    """Test no_NO address provider methods"""
 
-    def test_postcode(self):
+    def test_postcode(self, faker):
         for _ in range(100):
-            assert re.match(r'^[0-9]{4}$', self.fake.postcode())
-
-    def test_city_suffix(self):
-        suffix = self.fake.city_suffix()
-        assert isinstance(suffix, str)
-
-    def test_street_suffix(self):
-        suffix = self.fake.street_suffix()
-        assert isinstance(suffix, str)
-
-    def test_address(self):
-        address = self.fake.address()
-        assert isinstance(address, str)
-
-
-class TestZhTW(unittest.TestCase):
-    """ Tests addresses in the zh_tw locale """
-
-    def setUp(self):
-        self.fake = Faker('zh_TW')
-        Faker.seed(0)
-
-    def test_address(self):
-        country = self.fake.country()
-        assert isinstance(country, str)
-
-        street = self.fake.street_name()
-        assert isinstance(street, str)
-
-        city = self.fake.city()
-        assert isinstance(city, str)
-
-        address = self.fake.address()
-        assert isinstance(address, str)
-
-
-class TestZhCN(unittest.TestCase):
-    """ Tests addresses in the zh_cn locale """
-
-    def setUp(self):
-        self.fake = Faker('zh_CN')
-        Faker.seed(0)
-
-    def test_address(self):
-        country = self.fake.country()
-        assert isinstance(country, str)
-
-        street = self.fake.street_name()
-        assert isinstance(street, str)
-
-        city = self.fake.street_address()
-        assert isinstance(city, str)
+            assert re.fullmatch(r'^[0-9]{4}$', faker.postcode())
 
-        province = self.fake.province()
-        assert isinstance(province, str)
+    def test_city_suffix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_suffix = faker.city_suffix()
+            assert isinstance(city_suffix, str)
+            assert city_suffix in NoNoAddressProvider.city_suffixes
 
-        district = self.fake.district()
-        assert isinstance(district, str)
+    def test_street_suffix(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_suffix = faker.street_suffix()
+            assert isinstance(street_suffix, str)
+            assert street_suffix in NoNoAddressProvider.street_suffixes
 
-        address = self.fake.address()
-        assert isinstance(address, str)
+    def test_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            address = faker.address()
+            assert isinstance(address, str)
 
-        for _ in range(100):
-            assert re.match(r'\d{5}', self.fake.postcode())
-
-
-class TestPtBr(unittest.TestCase):
-
-    def setUp(self):
-        self.fake = Faker('pt_BR')
-        Faker.seed(0)
 
-    def test_address(self):
-        country = self.fake.country()
-        assert isinstance(country, str)
+class TestZhTw:
+    """Test zh_TW address provider methods"""
 
-        street = self.fake.street_name()
-        assert isinstance(street, str)
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert re.fullmatch(r'[1-9]\d{2}(?:\d{2})?', postcode)
+
+    def test_city_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_name = faker.city_name()
+            assert isinstance(city_name, str)
+            assert city_name in ZhTwAddressProvider.cities
+
+    def test_city_suffix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_suffix = faker.city_suffix()
+            assert isinstance(city_suffix, str)
+            assert city_suffix in ZhTwAddressProvider.city_suffixes
+
+    def test_city(self, faker, num_samples):
+        city_pattern = re.compile(r'(?P<city_name>.*?)[市縣]?')
+        for _ in range(num_samples):
+            city = faker.city()
+            assert isinstance(city, str)
+            match = city_pattern.fullmatch(city)
+            assert match
+            assert match.group('city_name') in ZhTwAddressProvider.cities
 
-        city = self.fake.street_address()
-        assert isinstance(city, str)
+    def test_country(self, faker, num_samples):
+        for _ in range(num_samples):
+            country = faker.country()
+            assert isinstance(country, str)
+            assert country in ZhTwAddressProvider.countries
 
-        neighborhood = self.fake.neighborhood()
-        assert isinstance(neighborhood, str)
+    def test_street_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_name = faker.street_name()
+            assert isinstance(street_name, str)
+            assert street_name in ZhTwAddressProvider.street_names
 
-        state = self.fake.state()
-        assert isinstance(state, str)
+    def test_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            address = faker.address()
+            assert isinstance(address, str)
 
-        state_abbr = self.fake.state_abbr()
-        assert isinstance(state_abbr, str)
 
-        address = self.fake.address()
-        assert isinstance(address, str)
+class TestZhCn:
+    """Test zh_CN address provider methods"""
 
-    def test_raw_postcode(self):
-        for _ in range(100):
-            postcode = self.fake.postcode(formatted=False)
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
             assert isinstance(postcode, str)
-            assert re.match(r'^\d{8}$', postcode)
-
-    def test_formatted_postcode(self):
-        for _ in range(100):
-            postcode = self.fake.postcode()
+            assert re.fullmatch(r'[1-9]\d{5}', postcode)
+
+    def test_city_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_name = faker.city_name()
+            assert isinstance(city_name, str)
+            assert city_name in ZhCnAddressProvider.cities
+
+    def test_city_suffix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_suffix = faker.city_suffix()
+            assert isinstance(city_suffix, str)
+            assert city_suffix in ZhCnAddressProvider.city_suffixes
+
+    def test_city(self, faker, num_samples):
+        city_pattern = re.compile(r'.*?[市县]')
+        for _ in range(num_samples):
+            city = faker.city()
+            assert isinstance(city, str)
+            assert city_pattern.fullmatch(city)
+
+    def test_province(self, faker, num_samples):
+        for _ in range(num_samples):
+            province = faker.province()
+            assert isinstance(province, str)
+            assert province in ZhCnAddressProvider.provinces
+
+    def test_district(self, faker, num_samples):
+        for _ in range(num_samples):
+            district = faker.district()
+            assert isinstance(district, str)
+            assert district in ZhCnAddressProvider.districts
+
+    def test_country(self, faker, num_samples):
+        for _ in range(num_samples):
+            country = faker.country()
+            assert isinstance(country, str)
+            assert country in ZhCnAddressProvider.countries
+
+    def test_street_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_name = faker.street_name()
+            assert isinstance(street_name, str)
+
+    def test_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            address = faker.address()
+            assert isinstance(address, str)
+
+
+class TestPtBr:
+    """Test pt_BR address provider methods"""
+
+    def test_country(self, faker, num_samples):
+        for _ in range(num_samples):
+            country = faker.country()
+            assert isinstance(country, str)
+            assert country in PtBrAddressProvider.countries
+
+    def test_bairro(self, faker, num_samples):
+        for _ in range(num_samples):
+            bairro = faker.bairro()
+            assert isinstance(bairro, str)
+            assert bairro in PtBrAddressProvider.bairros
+
+    def test_neighborhood(self, faker, num_samples):
+        for _ in range(num_samples):
+            neighborhood = faker.neighborhood()
+            assert isinstance(neighborhood, str)
+            assert neighborhood in PtBrAddressProvider.bairros
+
+    def test_estado(self, faker, num_samples):
+        for _ in range(num_samples):
+            estado = faker.estado()
+            assert isinstance(estado, tuple)
+            assert estado in PtBrAddressProvider.estados
+
+    def test_estado_nome(self, faker, num_samples):
+        state_names = [state_name for state_abbr, state_name in PtBrAddressProvider.estados]
+        for _ in range(num_samples):
+            estado_nome = faker.estado_nome()
+            assert isinstance(estado_nome, str)
+            assert estado_nome in state_names
+
+    def test_estado_sigla(self, faker, num_samples):
+        state_abbrs = [state_abbr for state_abbr, state_name in PtBrAddressProvider.estados]
+        for _ in range(num_samples):
+            estado_sigla = faker.estado_sigla()
+            assert isinstance(estado_sigla, str)
+            assert estado_sigla in state_abbrs
+
+    def test_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            street = faker.street_name()
+            assert isinstance(street, str)
+            city = faker.street_address()
+            assert isinstance(city, str)
+            address = faker.address()
+            assert isinstance(address, str)
+
+    def test_raw_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode(formatted=False)
             assert isinstance(postcode, str)
-            assert re.match(r'^\d{5}-?\d{3}$', postcode)
+            assert re.fullmatch(r'\d{8}', postcode)
 
+    def test_formatted_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert re.fullmatch(r'\d{5}-?\d{3}', postcode)
 
-class TestPtPT(unittest.TestCase):
 
-    def setUp(self):
-        self.fake = Faker('pt_PT')
-        Faker.seed(0)
+class TestPtPt:
+    """Test pt_PT address provider methods"""
 
-    def test_distrito(self):
-        distrito = self.fake.distrito()
-        assert isinstance(distrito, str)
-        assert distrito in PtPtProvider.distritos
+    def test_distrito(self, faker, num_samples):
+        for _ in range(num_samples):
+            distrito = faker.distrito()
+            assert isinstance(distrito, str)
+            assert distrito in PtPtAddressProvider.distritos
 
-    def test_concelho(self):
-        concelho = self.fake.concelho()
-        assert isinstance(concelho, str)
-        assert concelho in PtPtProvider.concelhos
+    def test_concelho(self, faker, num_samples):
+        for _ in range(num_samples):
+            concelho = faker.concelho()
+            assert isinstance(concelho, str)
+            assert concelho in PtPtAddressProvider.concelhos
 
-    def test_freguesia(self):
-        freguesia = self.fake.freguesia()
-        assert isinstance(freguesia, str)
-        assert freguesia in PtPtProvider.freguesias
+    def test_freguesia(self, faker, num_samples):
+        for _ in range(num_samples):
+            freguesia = faker.freguesia()
+            assert isinstance(freguesia, str)
+            assert freguesia in PtPtAddressProvider.freguesias
 
-    def test_place_name(self):
-        place_name = self.fake.place_name()
-        assert isinstance(place_name, str)
-        assert place_name in PtPtProvider.places
+    def test_place_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            place_name = faker.place_name()
+            assert isinstance(place_name, str)
+            assert place_name in PtPtAddressProvider.places
 
 
-class TestEnPh(unittest.TestCase):
-    num_sample_runs = 1000
+class TestEnPh:
+    """Test en_PH address provider methods"""
 
-    def setUp(self):
-        self.building_number_pattern = re.compile(
-            r'^(?:[1-9]|[1-9]\d{1,3})(?:[A-J]|\s[A-J]|-[A-J]|\sUnit\s[A-J])?$',
+    @classmethod
+    def setup_class(cls):
+        cls.building_number_pattern = re.compile(
+            r'(?:[1-9]|[1-9]\d{1,3})(?:[A-J]|\s[A-J]|-[A-J]|\sUnit\s[A-J])?',
         )
-        self.address_pattern = re.compile(
-            r'^(?P<street_address>.*), (?P<lgu>.*?), (?P<postcode>\d{4}) (?P<province>.*?)$',
+        cls.address_pattern = re.compile(
+            r'(?P<street_address>.*), (?P<lgu>.*?), (?P<postcode>\d{4}) (?P<province>.*?)',
         )
-        self.setup_constants()
-        self.setup_faker()
-
-    def setup_faker(self):
-        self.fake = Faker('en_PH')
-        Faker.seed(0)
-
-    def setup_constants(self):
-        from faker.providers.address.en_PH import Provider
-        self.metro_manila_postcodes = Provider.metro_manila_postcodes
-        self.luzon_province_postcodes = Provider.luzon_province_postcodes
-        self.visayas_province_postcodes = Provider.visayas_province_postcodes
-        self.mindanao_province_postcodes = Provider.mindanao_province_postcodes
-        self.postcodes = Provider.postcodes
-        self.provinces = Provider.provinces
-        self.province_lgus = Provider.province_lgus
-        self.metro_manila_lgus = Provider.metro_manila_lgus
-
-    def test_PH_metro_manila_postcode(self):
-        for i in range(self.num_sample_runs):
-            assert int(self.fake.metro_manila_postcode()) in self.metro_manila_postcodes
-
-    def test_PH_luzon_province_postcode(self):
-        for i in range(self.num_sample_runs):
-            assert int(self.fake.luzon_province_postcode()) in self.luzon_province_postcodes
-
-    def test_PH_visayas_province_postcode(self):
-        for i in range(self.num_sample_runs):
-            assert int(self.fake.visayas_province_postcode()) in self.visayas_province_postcodes
-
-    def test_PH_mindanao_province_postcode(self):
-        for i in range(self.num_sample_runs):
-            assert int(self.fake.mindanao_province_postcode()) in self.mindanao_province_postcodes
-
-    def test_PH_postcode(self):
-        for i in range(self.num_sample_runs):
-            assert int(self.fake.postcode()) in self.postcodes
-
-    def test_PH_building_number(self):
-        for i in range(self.num_sample_runs):
-            assert self.building_number_pattern.match(self.fake.building_number())
-
-    def test_PH_floor_unit_number(self):
-        for i in range(self.num_sample_runs):
-            number = self.fake.floor_unit_number()
+        cls.metro_manila_postcodes = EnPhAddressProvider.metro_manila_postcodes
+        cls.luzon_province_postcodes = EnPhAddressProvider.luzon_province_postcodes
+        cls.visayas_province_postcodes = EnPhAddressProvider.visayas_province_postcodes
+        cls.mindanao_province_postcodes = EnPhAddressProvider.mindanao_province_postcodes
+        cls.postcodes = EnPhAddressProvider.postcodes
+        cls.provinces = EnPhAddressProvider.provinces
+        cls.province_lgus = EnPhAddressProvider.province_lgus
+        cls.metro_manila_lgus = EnPhAddressProvider.metro_manila_lgus
+
+    def test_metro_manila_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert int(faker.metro_manila_postcode()) in self.metro_manila_postcodes
+
+    def test_luzon_province_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert int(faker.luzon_province_postcode()) in self.luzon_province_postcodes
+
+    def test_visayas_province_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert int(faker.visayas_province_postcode()) in self.visayas_province_postcodes
+
+    def test_mindanao_province_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert int(faker.mindanao_province_postcode()) in self.mindanao_province_postcodes
+
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert int(faker.postcode()) in self.postcodes
+
+    def test_building_number(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert self.building_number_pattern.fullmatch(faker.building_number())
+
+    def test_floor_unit_number(self, faker, num_samples):
+        for _ in range(num_samples):
+            number = faker.floor_unit_number()
             assert 2 <= int(number[:-2]) <= 99
             assert 1 <= int(number[-2:]) <= 40
 
-    def test_PH_address(self):
-        for i in range(self.num_sample_runs):
-            address = self.fake.address()
-            match = self.address_pattern.match(address)
+    def test_address(self, faker, num_samples):
+        for _ in range(num_samples):
+            address = faker.address()
+            match = self.address_pattern.fullmatch(address)
             street_address = match.group('street_address')
             lgu = match.group('lgu')
             postcode = match.group('postcode')
@@ -1158,54 +1285,74 @@ class TestEnPh(unittest.TestCase):
 
 
 class TestFilPh(TestEnPh):
-
-    def setup_faker(self):
-        self.fake = Faker('fil_PH')
-        Faker.seed(0)
+    """Test fil_PH address provider methods"""
+    pass
 
 
 class TestTlPh(TestEnPh):
-
-    def setup_faker(self):
-        self.fake = Faker('tl_PH')
-        Faker.seed(0)
-
-
-class TestRuRU(unittest.TestCase):
-    """ Tests addresses in the ru_RU locale """
-
-    def setUp(self):
-        self.fake = Faker('ru_RU')
-        Faker.seed(0)
-
-    def test_city_name(self):
-        city = self.fake.city_name()
-        assert isinstance(city, str)
-
-    def test_country(self):
-        country = self.fake.country()
-        assert isinstance(country, str)
-
-    def test_region(self):
-        region = self.fake.region()
-        assert isinstance(region, str)
-
-    def test_postcode(self):
-        postcode = self.fake.postcode()
-        assert isinstance(postcode, str)
-
-    def test_city_prefix(self):
-        city_prefix = self.fake.city_prefix()
-        assert isinstance(city_prefix, str)
-
-    def test_street_suffix(self):
-        street_suffix = self.fake.street_suffix()
-        assert isinstance(street_suffix, str)
-
-    def test_street_title(self):
-        street_title = self.fake.street_title()
-        assert isinstance(street_title, str)
-
-    def test_street_name(self):
-        street_name = self.fake.street_name()
-        assert isinstance(street_name, str)
+    """Test tl_PH address provider methods"""
+    pass
+
+
+class TestRuRu:
+    """Test ru_RU address provider methods"""
+
+    def test_city_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            city = faker.city_name()
+            assert isinstance(city, str)
+            assert city in RuRuAddressProvider.city_names
+
+    def test_country(self, faker, num_samples):
+        for _ in range(num_samples):
+            country = faker.country()
+            assert isinstance(country, str)
+            assert country in RuRuAddressProvider.countries
+
+    def test_region(self, faker, num_samples):
+        region_pattern = re.compile(
+            r'(?:респ\. (?P<region_republic>.*))|'
+            r'(?:(?P<region_krai>.*?) край)|'
+            r'(?:(?P<region_oblast>.*?) обл.)|'
+            r'(?:(?P<region_ao>.*?) АО)',
+        )
+        for _ in range(num_samples):
+            region = faker.region()
+            assert isinstance(region, str)
+            match = region_pattern.fullmatch(region)
+            assert match
+            groupdict = match.groupdict()
+            assert any([
+                groupdict.get('region_republic') in RuRuAddressProvider.region_republics,
+                groupdict.get('region_krai') in RuRuAddressProvider.region_krai,
+                groupdict.get('region_oblast') in RuRuAddressProvider.region_oblast,
+                groupdict.get('region_ao') in RuRuAddressProvider.region_ao,
+            ])
+
+    def test_postcode(self, faker, num_samples):
+        for _ in range(num_samples):
+            postcode = faker.postcode()
+            assert isinstance(postcode, str)
+            assert re.fullmatch(r'\d{6}', postcode)
+
+    def test_city_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            city_prefix = faker.city_prefix()
+            assert isinstance(city_prefix, str)
+            assert city_prefix in RuRuAddressProvider.city_prefixes
+
+    def test_street_suffix(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_suffix = faker.street_suffix()
+            assert isinstance(street_suffix, str)
+            assert street_suffix in RuRuAddressProvider.street_suffixes
+
+    def test_street_title(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_title = faker.street_title()
+            assert isinstance(street_title, str)
+
+    def test_street_name(self, faker, num_samples):
+        for _ in range(num_samples):
+            street_name = faker.street_name()
+            assert isinstance(street_name, str)
diff --git a/tests/providers/test_automotive.py b/tests/providers/test_automotive.py
index 71166f97..f79289c6 100644
--- a/tests/providers/test_automotive.py
+++ b/tests/providers/test_automotive.py
@@ -1,190 +1,160 @@
 import re
-import unittest
 
-from faker import Faker
+from faker.providers.automotive.de_DE import Provider as DeDeAutomotiveProvider
+from faker.providers.automotive.es_ES import Provider as EsEsAutomotiveProvider
+from faker.providers.automotive.ru_RU import Provider as RuRuAutomotiveProvider
 
 
-class TestPtBR(unittest.TestCase):
+class _SimpleAutomotiveTestMixin:
+    """Use this test mixin for simple license plate validation"""
 
-    def setUp(self):
-        self.fake = Faker('pt_BR')
-        Faker.seed(0)
-        self.format = re.compile(r'[\w]{3}-[\d]{4}')
-
-    def test_plate_has_been_generated(self):
-        plate = self.fake.license_plate()
-        assert isinstance(plate, str)
-        assert self.format.match(plate), "%s is not in the correct format." % plate
-
-
-class TestPtPT(unittest.TestCase):
-
-    def setUp(self):
-        self.fake = Faker('pt_PT')
-        Faker.seed(0)
-        self.pattern = re.compile(r'^\d{2}-\d{2}-[aA-zZ]{2}$|^\d{2}-[aA-zZ]{2}-\d{2}$|^[aA-zZ]{2}-\d{2}-\d{2}$')
-
-    def test_pt_PT_plate_format(self):
-        plate = self.fake.license_plate()
-        assert self.pattern.match(plate), "%s is not in the correct format." % plate
-
-
-class TestHuHU(unittest.TestCase):
-
-    def setUp(self):
-        self.fake = Faker('hu_HU')
-        Faker.seed(0)
-
-    def test_hu_HU_plate_format(self):
-        plate = self.fake.license_plate()
-        assert re.match(r"[A-Z]{3}-\d{3}", plate), "%s is not in the correct format." % plate
+    def perform_extra_checks(self, license_plate, match):
+        pass
 
+    def test_license_plate(self, faker, num_samples):
+        for _ in range(num_samples):
+            license_plate = faker.license_plate()
+            match = self.license_plate_pattern.fullmatch(license_plate)
+            assert match
+            self.perform_extra_checks(license_plate, match)
 
-class TestDeDe(unittest.TestCase):
 
-    def setUp(self):
-        self.fake = Faker('de_DE')
-        Faker.seed(0)
+class TestPtBr(_SimpleAutomotiveTestMixin):
+    """Test pt_BR automotive provider methods"""
+    license_plate_pattern = re.compile(r'[A-Z]{3}-\d{4}')
 
-    def test_de_DE_plate_format(self):
-        plate = self.fake.license_plate()
-        assert re.match(r"[A-Z\u00D6\u00DC]{1,3}-[A-Z]{1,2}-\d{1,4}", plate, flags=re.UNICODE), \
-            "%s is not in the correct format." % plate
 
+class TestPtPt(_SimpleAutomotiveTestMixin):
+    """Test pt_PT automotive provider methods"""
+    license_plate_pattern = re.compile(
+        r'\d{2}-\d{2}-[A-Z]{2}|'
+        r'\d{2}-[A-Z]{2}-\d{2}|'
+        r'[A-Z]{2}-\d{2}-\d{2}',
+    )
 
-class TestSvSE(unittest.TestCase):
 
-    def setUp(self):
-        self.fake = Faker('sv_SE')
-        Faker.seed(0)
+class TestHuHu(_SimpleAutomotiveTestMixin):
+    """Test hu_HU automotive provider methods"""
+    license_plate_pattern = re.compile(r'[A-Z]{3}-\d{3}')
 
-    def test_sv_SE_plate_format(self):
-        plate = self.fake.license_plate()
-        assert re.match(r"[A-Z]{3} \d{2}[\dA-Z]{1}", plate), "%s is not in the correct format." % plate
 
+class TestDeDe(_SimpleAutomotiveTestMixin):
+    """Test de_DE automotive provider methods"""
+    license_plate_pattern = re.compile(
+        r'(?P<prefix>[A-Z\u00D6\u00DC]{1,3})-[A-Z]{1,2}-[1-9]{1,4}',
+        re.UNICODE,
+    )
 
-class TestPlPL(unittest.TestCase):
+    def perform_extra_checks(self, license_plate, match):
+        assert match.group('prefix') in DeDeAutomotiveProvider.license_plate_prefix
 
-    def setUp(self):
-        self.fake = Faker('pl_PL')
-        Faker.seed(0)
 
-    def test_pl_PL_plate_format(self):
-        plate = self.fake.license_plate()
-        patterns = self.fake.license_plate_regex_formats()
-        assert re.match(r'{patterns}'.format(patterns='|'.join(patterns)),
-                        plate), '{plate} is not the correct format.'.format(plate=plate)
+class TestSvSe(_SimpleAutomotiveTestMixin):
+    """Test sv_SE automotive provider methods"""
+    license_plate_pattern = re.compile(r'[A-Z]{3} \d{2}[\dA-Z]')
 
 
-class TestEnPh(unittest.TestCase):
-    num_sample_runs = 1000
+class TestPlPl:
 
-    def setUp(self):
-        self.motorcycle_pattern = re.compile(r'^[A-Z]{2}\d{4,5}$')
-        self.automobile_pattern = re.compile(r'^[A-Z]{3}\d{3,4}$')
-        self.vehicle_pattern = re.compile(r'^(?:[A-Z]{2}\d{4,5}|[A-Z]{3}\d{3,4})$')
-        self.setup_faker()
+    def test_License_plate(self, faker, num_samples):
+        pattern = re.compile(r'{patterns}'.format(patterns='|'.join(faker.license_plate_regex_formats())))
+        for _ in range(num_samples):
+            plate = faker.license_plate()
+            assert pattern.fullmatch(plate)
 
-    def setup_faker(self):
-        self.fake = Faker('en_PH')
-        Faker.seed(0)
 
-    def test_PH_motorcycle_plate_format(self):
-        for i in range(self.num_sample_runs):
-            assert self.motorcycle_pattern.match(self.fake.motorcycle_license_plate())
+class TestEnPh(_SimpleAutomotiveTestMixin):
+    """Test en_PH automotive provider methods"""
+    license_plate_pattern = re.compile(r'[A-Z]{2}\d{4,5}|[A-Z]{3}\d{3,4}')
+    motorcycle_pattern = re.compile(r'[A-Z]{2}\d{4,5}')
+    automobile_pattern = re.compile(r'[A-Z]{3}\d{3,4}')
 
-    def test_PH_automobile_plate_format(self):
-        for i in range(self.num_sample_runs):
-            assert self.automobile_pattern.match(self.fake.automobile_license_plate())
+    def test_motorcycle_plate(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert self.motorcycle_pattern.match(faker.motorcycle_license_plate())
 
-    def test_PH_plate_format(self):
-        for i in range(self.num_sample_runs):
-            assert self.vehicle_pattern.match(self.fake.license_plate())
+    def test_automobile_plate(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert self.automobile_pattern.match(faker.automobile_license_plate())
 
-    def test_PH_protocol_plate_format(self):
-        for i in range(self.num_sample_runs):
-            assert int(self.fake.protocol_license_plate()) != 15
+    def test_protocol_plate(self, faker, num_samples):
+        for _ in range(num_samples):
+            protocol_plate = faker.protocol_license_plate()
+            assert int(protocol_plate) != 15 and 1 <= int(protocol_plate) <= 17
 
 
 class TestFilPh(TestEnPh):
-
-    def setup_faker(self):
-        self.fake = Faker('fil_PH')
-        Faker.seed(0)
+    """Test fil_PH automotive provider methods"""
+    pass
 
 
 class TestTlPh(TestEnPh):
-
-    def setup_faker(self):
-        self.fake = Faker('tl_PH')
-        Faker.seed(0)
-
-
-class TestRuRU(unittest.TestCase):
-
-    def setUp(self):
-        self.fake = Faker('ru_RU')
-        Faker.seed(0)
-
-    def test_ru_RU_plate_format(self):
-        plate = self.fake.license_plate()
-        assert isinstance(plate, str)
-
-    def test_vehicle_category(self):
-        category = self.fake.vehicle_category()
-        assert isinstance(category, str)
-
-
-class TestFrFR(unittest.TestCase):
-
-    def setUp(self):
-        self.fake = Faker('fr_FR')
-        Faker.seed(0)
-        self.pattern = re.compile(r'^\d{3}-[A-Z]{3}-\d{2}$|^[A-Z]{2}-\d{3}-[A-Z]{2}')
-
-    def test_fr_FR_plate_format(self):
-        plate = self.fake.license_plate()
-        assert isinstance(plate, str)
-        assert self.pattern.match(plate)
-
-
-class TestNoNO(unittest.TestCase):
-
-    def setUp(self):
-        self.fake = Faker('no_NO')
-        Faker.seed(0)
-
-    def test_sv_SE_plate_format(self):
-        plate = self.fake.license_plate()
-        assert re.match(r"^[A-Z]{2} \d{5}$", plate), "%s is not in the correct format." % plate
-
-
-class TestEsES(unittest.TestCase):
-
-    def setUp(self):
-        self.fake = Faker('es_ES')
-        Faker.seed(0)
-        self.new_format_pattern = re.compile(r'\d{4}\s[A-Z]{3}')
-        self.old_format_pattern = re.compile(r'[A-Z]{1,2}\s\d{4}\s[A-Z]{2}')
-
-    def test_es_ES_plate_new_format(self):
-        plate = self.fake.license_plate_unified()
-        assert isinstance(plate, str)
-        assert self.new_format_pattern.match(plate)
-
-    def test_es_ES_plate_old_format(self):
-        plate = self.fake.license_plate_by_province()
-        assert isinstance(plate, str)
-        assert self.old_format_pattern.match(plate)
-
-    def test_es_ES_plate_old_format_explicit_province_prefix(self):
-        plate = self.fake.license_plate_by_province(province_prefix="CA")
-        assert isinstance(plate, str)
-        assert self.old_format_pattern.match(plate)
-        assert plate[:2] == "CA"
-
-    def test_es_ES_plate_format(self):
-        plate = self.fake.license_plate()
+    """Test tl_PH automotive provider methods"""
+    pass
+
+
+class TestRuRu(_SimpleAutomotiveTestMixin):
+    """Test ru_RU automotive provider methods"""
+    _plate_letters = ''.join(RuRuAutomotiveProvider.license_plate_letters)
+    license_plate_pattern = re.compile(
+        r'(?:'
+        r'(?P<private_plate_prefix>[{0}]\d\d\d[{0}][{0}])|'
+        r'(?P<public_transport_plate_prefix>[{0}][{0}]\d\d\d)|'
+        r'(?P<trailer_plate_prefix>[{0}][{0}]\d\d\d\d)|'
+        r'(?P<police_plate_prefix>[{0}]\d\d\d\d)|'
+        r'(?P<military_plate_prefix>\d\d\d\d[{0}][{0}])|'
+        r'(?P<plate_number_special>00\dCD\d|00\dD\d\d\d|00\dT\d\d\d)'
+        r') (?P<plate_suffix>.*)'.format(_plate_letters),
+    )
+
+    def perform_extra_checks(self, license_plate, match):
+        plate_suffix = match.group('plate_suffix')
+        assert plate_suffix in RuRuAutomotiveProvider.license_plate_suffix
+
+    def test_vehicle_category(self, faker, num_samples):
+        for _ in range(num_samples):
+            vehicle_category = faker.vehicle_category()
+            assert isinstance(vehicle_category, str)
+            assert vehicle_category in RuRuAutomotiveProvider.vehicle_categories
+
+
+class TestFrFr(_SimpleAutomotiveTestMixin):
+    """Test fr_FR automotive provider methods"""
+    license_plate_pattern = re.compile(r'\d{3}-[A-Z]{3}-\d{2}|[A-Z]{2}-\d{3}-[A-Z]{2}')
+
+
+class TestNoNo(_SimpleAutomotiveTestMixin):
+    """Test no_NO automotive provider methods"""
+    license_plate_pattern = re.compile(r'[A-Z]{2} \d{5}')
+
+
+class TestEsEs:
+    """Test es_ES automotive provider methods"""
+    new_format_pattern = re.compile(r'\d{4}\s[A-Z]{3}')
+    old_format_pattern = re.compile(r'(?P<province_prefix>[A-Z]{1,2})\s\d{4}\s[A-Z]{2}')
+
+    def test_plate_new_format(self, faker, num_samples):
+        for _ in range(num_samples):
+            plate = faker.license_plate_unified()
+            assert isinstance(plate, str)
+            assert self.new_format_pattern.match(plate)
+
+    def test_plate_old_format(self, faker, num_samples):
+        for _ in range(num_samples):
+            plate = faker.license_plate_by_province()
+            assert isinstance(plate, str)
+            match = self.old_format_pattern.match(plate)
+            assert match
+            assert match.group('province_prefix') in EsEsAutomotiveProvider.province_prefix
+
+    def test_plate_old_format_explicit_province_prefix(self, faker, num_samples):
+        for _ in range(num_samples):
+            plate = faker.license_plate_by_province(province_prefix="CA")
+            assert isinstance(plate, str)
+            assert self.old_format_pattern.match(plate)
+            assert plate[:2] == "CA"
+
+    def test_plate_format(self, faker):
+        plate = faker.license_plate()
         assert isinstance(plate, str)
-        assert self.new_format_pattern.match(plate) or \
-            self.old_format_pattern.match(plate)
+        assert self.new_format_pattern.match(plate) or self.old_format_pattern.match(plate)
diff --git a/tests/providers/test_bank.py b/tests/providers/test_bank.py
index d06eb7fe..46f710ec 100644
--- a/tests/providers/test_bank.py
+++ b/tests/providers/test_bank.py
@@ -1,153 +1,151 @@
 import re
-import unittest
 
 import pytest
 
-from faker import Faker
-from faker.providers.bank.en_PH import Provider as EnPhProvider
+from faker.providers.bank import Provider as BankProvider
+from faker.providers.bank.en_GB import Provider as EnGbBankProvider
+from faker.providers.bank.en_PH import Provider as EnPhBankProvider
+from faker.providers.bank.es_ES import Provider as EsEsBankProvider
+from faker.providers.bank.fi_FI import Provider as FiFiBankProvider
+from faker.providers.bank.fr_FR import Provider as FrFrBankProvider
+from faker.providers.bank.no_NO import Provider as NoNoBankProvider
+from faker.providers.bank.pl_PL import Provider as PlPlBankProvider
+from faker.providers.bank.pt_PT import Provider as PtPtBankProvider
 
 
-class TestNoNO(unittest.TestCase):
-    """ Tests the bban in no_NO locale """
+def is_valid_iban(iban):
+    check = iban[4:] + iban[:4]
+    check = int(''.join(BankProvider.ALPHA.get(c, c) for c in check))
+    return check % 97 == 1
 
-    def setUp(self):
-        self.fake = Faker('no_NO')
-        Faker.seed(0)
 
-    def test_bban(self):
-        bban = self.fake.bban()
-        assert re.match(r"\d{11}", bban)
+class TestNoNo:
+    """Test no_NO bank provider"""
 
+    def test_bban(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.fullmatch(r"\d{11}", faker.bban())
 
-class TestFiFi(unittest.TestCase):
-    """ Tests the iban in fi_FI locale """
-
-    def setUp(self):
-        self.fake = Faker('fi_FI')
-        Faker.seed(0)
-
-    def test_bban(self):
-        bban = self.fake.bban()
-        assert re.match(r"\d{14}", bban)
-
-    def test_iban(self):
-        iban = self.fake.iban()
-        assert re.match(r"FI\d{16}", iban)
-
-
-class TestPlPL(unittest.TestCase):
-    """Tests the bank provider for pl_PL locale"""
-
-    def setUp(self):
-        self.fake = Faker('pl_PL')
-        Faker.seed(0)
-
-    def test_bban(self):
-        bban = self.fake.bban()
-        assert re.match(r"\d{26}", bban)
+    def test_iban(self, faker, num_samples):
+        for _ in range(num_samples):
+            iban = faker.iban()
+            assert is_valid_iban(iban)
+            assert iban[:2] == NoNoBankProvider.country_code
+            assert re.fullmatch(r"\d{2}\d{11}", iban[2:])
 
-    def test_iban(self):
-        iban = self.fake.iban()
-        assert re.match(r"PL\d{26}", iban)
 
+class TestFiFi:
+    """Test fi_FI bank provider"""
 
-class TestEnGB(unittest.TestCase):
-    """Tests the bank provider for en_GB locale"""
+    def test_bban(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.fullmatch(r"\d{14}", faker.bban())
 
-    def setUp(self):
-        self.fake = Faker('en_GB')
-        Faker.seed(0)
+    def test_iban(self, faker, num_samples):
+        for _ in range(num_samples):
+            iban = faker.iban()
+            assert is_valid_iban(iban)
+            assert iban[:2] == FiFiBankProvider.country_code
+            assert re.fullmatch(r"\d{2}\d{14}", iban[2:])
 
-    def test_bban(self):
-        bban = self.fake.bban()
-        assert re.match(r"[A-Z]{4}\d{14}", bban)
 
-    def test_iban(self):
-        iban = self.fake.iban()
-        assert re.match(r"GB\d{2}[A-Z]{4}\d{14}", iban)
+class TestPlPl:
+    """Test pl_PL bank provider"""
 
+    def test_bban(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.fullmatch(r"\d{26}", faker.bban())
 
-class TestRuRU(unittest.TestCase):
-    """Tests the bank provider for ru_RU locale"""
+    def test_iban(self, faker, num_samples):
+        for _ in range(num_samples):
+            iban = faker.iban()
+            assert is_valid_iban(iban)
+            assert iban[:2] == PlPlBankProvider.country_code
+            assert re.fullmatch(r"\d{2}\d{26}", iban[2:])
 
-    def setUp(self):
-        self.fake = Faker('ru_RU')
-        Faker.seed(0)
 
-    def test_bban(self):
-        bban = self.fake.bban()
-        assert re.match(r"[A-Z]{4}\d{13}", bban)
+class TestEnGb:
+    """Test en_GB bank provider"""
 
-    def test_iban(self):
-        iban = self.fake.iban()
-        assert re.match(r"RU\d{2}[A-Z]{4}\d{13}", iban)
+    def test_bban(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.fullmatch(r"[A-Z]{4}\d{14}", faker.bban())
 
-    def test_bic(self):
-        bic = self.fake.bic()
-        assert re.match(r"04\d{7,9}", bic)
+    def test_iban(self, faker, num_samples):
+        for _ in range(num_samples):
+            iban = faker.iban()
+            assert is_valid_iban(iban)
+            assert iban[:2] == EnGbBankProvider.country_code
+            assert re.fullmatch(r"\d{2}[A-Z]{4}\d{14}", iban[2:])
 
-    def test_correspondent_account(self):
-        correspondent_account = self.fake.correspondent_account()
-        assert re.match(r"301\d{17}", correspondent_account)
 
-    def test_checking_account(self):
-        checking_account = self.fake.checking_account()
-        assert re.match(r"\d{3}0\d{16}", checking_account)
+class TestRuRu:
+    """Test ru_RU bank provider"""
 
-    def test_bank(self):
-        bank = self.fake.bank()
-        assert re.match(r"\D{3,41}", bank)
+    def test_bic(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.match(r"04\d{7,9}", faker.bic())
 
+    def test_correspondent_account(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.match(r"301\d{17}", faker.correspondent_account())
 
-class TestPtPt(unittest.TestCase):
-    """Tests the bank provider for pt_PT locale"""
+    def test_checking_account(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.match(r"\d{3}0\d{16}", faker.checking_account())
 
-    def setUp(self):
-        self.fake = Faker('pt_PT')
-        Faker.seed(0)
+    def test_bank(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.match(r"\D{3,41}", faker.bank())
 
-    def test_bban(self):
-        bban = self.fake.bban()
-        assert re.match(r"\d{21}", bban)
 
-    def test_iban(self):
-        iban = self.fake.iban()
-        assert re.match(r"PT\d{21}", iban)
+class TestPtPt:
+    """Test pt_PT bank provider"""
 
+    def test_bban(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.fullmatch(r"\d{21}", faker.bban())
 
-class TestEsES(unittest.TestCase):
-    """Tests the bank provider for es_ES locale"""
+    def test_iban(self, faker, num_samples):
+        for _ in range(num_samples):
+            iban = faker.iban()
+            assert is_valid_iban(iban)
+            assert iban[:2] == PtPtBankProvider.country_code
+            assert re.fullmatch(r"\d{2}\d{21}", iban[2:])
 
-    def setUp(self):
-        self.fake = Faker('es_ES')
-        Faker.seed(0)
 
-    def test_bban(self):
-        bban = self.fake.bban()
-        assert re.match(r"\d{20}", bban)
+class TestEsEs:
+    """Test es_ES bank provider"""
 
-    def test_iban(self):
-        iban = self.fake.iban()
-        assert re.match(r"ES\d{22}", iban)
+    def test_bban(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.fullmatch(r"\d{20}", faker.bban())
 
+    def test_iban(self, faker, num_samples):
+        for _ in range(num_samples):
+            iban = faker.iban()
+            assert is_valid_iban(iban)
+            assert iban[:2] == EsEsBankProvider.country_code
+            assert re.fullmatch(r"\d{2}\d{20}", iban[2:])
 
-class TestFrFR(unittest.TestCase):
-    """Tests the bank provider for fr_FR locale"""
 
-    def setUp(self):
-        self.fake = Faker('fr_FR')
-        Faker.seed(0)
+class TestFrFr:
+    """Test fr_FR bank provider"""
 
-    def test_bban(self):
-        bban = self.fake.bban()
-        assert re.match(r"\d{23}", bban)
+    def test_bban(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.fullmatch(r"\d{23}", faker.bban())
 
-    def test_iban(self):
-        iban = self.fake.iban()
-        assert re.match(r"FR\d{25}", iban)
+    def test_iban(self, faker, num_samples):
+        for _ in range(num_samples):
+            iban = faker.iban()
+            assert is_valid_iban(iban)
+            assert iban[:2] == FrFrBankProvider.country_code
+            assert re.fullmatch(r"\d{2}\d{23}", iban[2:])
 
 
 class TestEnPh:
+    """Test en_PH bank provider"""
 
     def test_swift(self, faker, num_samples):
         regex = re.compile('[A-Z]{4}PH[A-Z0-9]{2}(?:[A-Z0-9]{3})?')
@@ -165,18 +163,18 @@ class TestEnPh:
         for _ in range(num_samples):
             code = faker.swift8(use_dataset=True)
             assert len(code) == 8
-            assert code[:4] in EnPhProvider.swift_bank_codes
-            assert code[4:6] == EnPhProvider.country_code
-            assert code[6:8] in EnPhProvider.swift_location_codes
+            assert code[:4] in EnPhBankProvider.swift_bank_codes
+            assert code[4:6] == EnPhBankProvider.country_code
+            assert code[6:8] in EnPhBankProvider.swift_location_codes
 
     def test_swift11_use_dataset(self, faker, num_samples):
         for _ in range(num_samples):
             code = faker.swift11(use_dataset=True)
             assert len(code) == 11
-            assert code[:4] in EnPhProvider.swift_bank_codes
-            assert code[4:6] == EnPhProvider.country_code
-            assert code[6:8] in EnPhProvider.swift_location_codes
-            assert code[8:11] in EnPhProvider.swift_branch_codes
+            assert code[:4] in EnPhBankProvider.swift_bank_codes
+            assert code[4:6] == EnPhBankProvider.country_code
+            assert code[6:8] in EnPhBankProvider.swift_location_codes
+            assert code[8:11] in EnPhBankProvider.swift_branch_codes
 
     def test_swift11_is_primary(self, faker, num_samples):
         for _ in range(num_samples):
@@ -186,8 +184,10 @@ class TestEnPh:
 
 
 class TestFilPh(TestEnPh):
+    """Test fil_PH bank provider"""
     pass
 
 
 class TestTlPh(TestEnPh):
+    """Test tl_PH bank provider"""
     pass
diff --git a/tests/providers/test_job.py b/tests/providers/test_job.py
index d0b7c76c..4bd52274 100644
--- a/tests/providers/test_job.py
+++ b/tests/providers/test_job.py
@@ -1,129 +1,90 @@
-import unittest
+from faker.providers.job import Provider as JobProvider
+from faker.providers.job.de_DE import Provider as DeDeJobProvider
+from faker.providers.job.el_GR import Provider as ElGrJobProvider
+from faker.providers.job.fr_FR import Provider as FrFrJobProvider
+from faker.providers.job.hu_HU import Provider as HuHuJobProvider
+from faker.providers.job.hy_AM import Provider as HyAmJobProvider
+from faker.providers.job.ja_JP import Provider as JaJpJobProvider
+from faker.providers.job.ko_KR import Provider as KoKrJobProvider
+from faker.providers.job.pt_BR import Provider as PtBrJobProvider
+from faker.providers.job.pt_PT import Provider as PtPtJobProvider
 
-from faker import Faker
 
+class TestJobProvider:
+    """Test job provider methods"""
 
-class TestJob(unittest.TestCase):
-    """
-    Test Job
-    """
+    def test_job(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.job() in JobProvider.jobs
 
-    def setUp(self):
-        self.fake = Faker()
-        Faker.seed(0)
 
-    def test_job(self):
-        job = self.fake.job()
-        assert isinstance(job, str)
+class TestJaJp:
+    """Test ja_JP job provider"""
 
+    def test_job(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.job() in JaJpJobProvider.jobs
 
-class TestJaJP(unittest.TestCase):
-    """
-    Test Job ja_JP
-    """
 
-    def setUp(self):
-        self.fake = Faker('ja_JP')
-        Faker.seed(0)
+class TestKoKr:
+    """Test ko_KR job provider"""
 
-    def test_job(self):
-        job = self.fake.job()
-        assert isinstance(job, str)
+    def test_job(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.job() in KoKrJobProvider.jobs
 
 
-class TestKoKR(unittest.TestCase):
-    """
-    Test Job ko_KR
-    """
+class TestHuHu:
+    """Test hu_HU job provider"""
 
-    def setUp(self):
-        self.fake = Faker('ko_KR')
-        Faker.seed(0)
+    def test_job(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.job() in HuHuJobProvider.jobs
 
-    def test_job(self):
-        job = self.fake.job()
-        assert isinstance(job, str)
 
+class TestHyAm:
+    """Test hy_AM job provider"""
 
-class TestHuHU(unittest.TestCase):
-    "Tests the job module in the Hungarian locale."
+    def test_job(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.job() in HyAmJobProvider.jobs
 
-    def setUp(self):
-        self.fake = Faker('hu_HU')
-        Faker.seed(0)
 
-    def test_job(self):
-        job = self.fake.job()
-        assert isinstance(job, str)
+class TestDeDe:
+    """Test de_DE job provider"""
 
+    def test_job(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.job() in DeDeJobProvider.jobs
 
-class TestHyAm(unittest.TestCase):
-    """ Tests jobs in the hy_AM locale """
 
-    def setUp(self):
-        self.fake = Faker('hy_AM')
-        Faker.seed(0)
+class TestFrFr:
+    """Test fr_FR job provider"""
 
-    def test_job(self):
-        job = self.fake.job()
-        assert isinstance(job, str)
+    def test_job(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.job() in FrFrJobProvider.jobs
 
 
-class TestDeDe(unittest.TestCase):
-    """ Tests jobs in the de_DE locale """
+class TestElGr:
+    """Test el_GR job provider"""
 
-    def setUp(self):
-        self.fake = Faker('de_DE')
-        Faker.seed(0)
+    def test_job(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.job() in ElGrJobProvider.jobs
 
-    def test_job(self):
-        job = self.fake.job()
-        assert isinstance(job, str)
 
+class TestPtPt:
+    """Test pt_PT job provider"""
 
-class TestFrFr(unittest.TestCase):
-    """ Tests jobs in the fr_FR locale """
+    def test_job(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.job() in PtPtJobProvider.jobs
 
-    def setUp(self):
-        self.fake = Faker('fr_FR')
-        Faker.seed(0)
 
-    def test_job(self):
-        job = self.fake.job()
-        assert isinstance(job, str)
+class TestPtBr:
+    """Test de_DE job provider"""
 
-
-class TestElGr(unittest.TestCase):
-    """ Tests jobs in the el_GR locale """
-
-    def setUp(self):
-        self.fake = Faker('el_GR')
-        Faker.seed(0)
-
-    def test_job(self):
-        job = self.fake.job()
-        assert isinstance(job, str)
-
-
-class TestPtPt(unittest.TestCase):
-    """ Tests jobs in the pt_PT locale """
-
-    def setUp(self):
-        self.fake = Faker('pt_PT')
-        Faker.seed(0)
-
-    def test_job(self):
-        job = self.fake.job()
-        assert isinstance(job, str)
-
-
-class TestPtBR(unittest.TestCase):
-    """ Tests jobs in the pt_BR locale """
-
-    def setUp(self):
-        self.fake = Faker('pt_BR')
-        Faker.seed(0)
-
-    def test_job(self):
-        job = self.fake.job()
-        assert isinstance(job, str)
+    def test_job(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.job() in PtBrJobProvider.jobs
diff --git a/tests/providers/test_lorem.py b/tests/providers/test_lorem.py
new file mode 100644
index 00000000..7ba59859
--- /dev/null
+++ b/tests/providers/test_lorem.py
@@ -0,0 +1,158 @@
+import re
+
+import pytest
+
+
+class TestLoremProvider:
+    """Test lorem provider methods"""
+    custom_word_list = [
+        'danish', 'cheesecake', 'sugar', 'lollipop',
+        'wafer', 'gummies', 'jelly', 'pie',
+    ]
+
+    def test_word_with_defaults(self, faker, num_samples):
+        for _ in range(num_samples):
+            word = faker.word()
+            assert isinstance(word, str)
+
+    def test_word_with_custom_list(self, faker, num_samples):
+        for _ in range(num_samples):
+            word = faker.word(ext_word_list=self.custom_word_list)
+            assert isinstance(word, str)
+            assert word in self.custom_word_list
+
+    def test_words_with_zero_nb(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.words(0) == []
+
+    def test_words_with_defaults(self, faker, num_samples):
+        num_words = 5
+        for _ in range(num_samples):
+            words = faker.words(num_words)
+            assert isinstance(words, list)
+            assert len(words) == 5
+            assert all(isinstance(word, str) for word in words)
+
+    def test_words_with_custom_word_list(self, faker, num_samples):
+        num_words = 5
+        for _ in range(num_samples):
+            words = faker.words(num_words, ext_word_list=self.custom_word_list)
+            assert isinstance(words, list)
+            assert len(words) == 5
+            assert all(isinstance(word, str) and word in self.custom_word_list for word in words)
+
+    def test_words_with_unique_sampling(self, faker, num_samples):
+        num_words = 5
+        for _ in range(num_samples):
+            words = faker.words(num_words, ext_word_list=self.custom_word_list, unique=True)
+            assert isinstance(words, list)
+            assert len(words) == 5
+
+            checked_words = []
+            for word in words:
+                assert isinstance(word, str)
+                assert word in self.custom_word_list
+                assert word not in checked_words
+                checked_words.append(word)
+
+    def test_sentence_no_words(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.sentence(0) == ''
+
+    def test_sentence_with_inexact_word_count(self, faker, num_samples):
+        num_words = 10
+        for _ in range(num_samples):
+            sentence = faker.sentence(nb_words=num_words)
+            words = sentence.lower().replace('.', '').split()
+            assert int(num_words * 0.6) <= len(words) <= int(num_words * 1.4)
+
+    def test_sentence_with_exact_word_count(self, faker, num_samples):
+        num_words = 10
+        for _ in range(num_samples):
+            sentence = faker.sentence(nb_words=num_words, variable_nb_words=False)
+            words = sentence.lower().replace('.', '').split()
+            assert len(words) == num_words
+
+    def test_sentence_with_custom_word_list(self, faker, num_samples):
+        for _ in range(num_samples):
+            sentence = faker.sentence(ext_word_list=self.custom_word_list)
+            words = sentence.lower().replace('.', '').split()
+            assert all(isinstance(word, str) and word in self.custom_word_list for word in words)
+
+    def test_sentences(self, faker, num_samples):
+        num_sentences = 5
+        for _ in range(num_samples):
+            sentences = faker.sentences(nb=num_sentences, ext_word_list=self.custom_word_list)
+            assert len(sentences) == num_sentences
+            for sentence in sentences:
+                words = sentence.lower().replace('.', '').split()
+                assert all(isinstance(word, str) and word in self.custom_word_list for word in words)
+
+    def test_paragraph_no_sentences(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert faker.paragraph(0) == ''
+
+    def test_paragraph_with_inexact_sentence_count(self, faker, num_samples):
+        num_sentences = 10
+        for _ in range(num_samples):
+            paragraph = faker.paragraph(nb_sentences=num_sentences)
+            sentences = paragraph.split('. ')
+            assert int(num_sentences * 0.6) <= len(sentences) <= int(num_sentences * 1.4)
+
+    def test_paragraph_with_exact_sentence_count(self, faker, num_samples):
+        num_sentences = 10
+        for _ in range(num_samples):
+            paragraph = faker.paragraph(nb_sentences=num_sentences, variable_nb_sentences=False)
+            sentences = paragraph.split('. ')
+            assert len(sentences) == num_sentences
+
+    def test_paragraph_with_custom_word_list(self, faker, num_samples):
+        for _ in range(num_samples):
+            paragraph = faker.paragraph(ext_word_list=self.custom_word_list)
+            words = paragraph.lower().replace('.', '').split()
+            assert all(isinstance(word, str) and word in self.custom_word_list for word in words)
+
+    def test_paragraphs(self, faker, num_samples):
+        num_paragraphs = 5
+        for _ in range(num_samples):
+            paragraphs = faker.paragraphs(nb=num_paragraphs, ext_word_list=self.custom_word_list)
+            assert len(paragraphs) == num_paragraphs
+            for paragraph in paragraphs:
+                words = paragraph.lower().replace('.', '').split()
+                assert all(isinstance(word, str) and word in self.custom_word_list for word in words)
+
+    def test_text_with_less_than_four_characters(self, faker, num_samples):
+        for _ in range(num_samples):
+            with pytest.raises(ValueError):
+                faker.text(max_nb_chars=4)
+
+    @pytest.mark.parametrize('num_chars', [10, 50, 150, 10000], ids=[
+        'max_nb_chars < 25',
+        '25 <= max_nb_chars < 100',
+        'max_nb_chars >= 100',
+        'max_nb_chars >> 100',
+    ])
+    def test_text_with_valid_character_count(self, faker, num_samples, num_chars):
+        for _ in range(num_samples):
+            text = faker.text(max_nb_chars=num_chars)
+            assert len(text) <= num_chars
+
+    def test_text_with_custom_word_list(self, faker, num_samples):
+        for _ in range(num_samples):
+            text = faker.text(ext_word_list=self.custom_word_list)
+            words = re.sub(r'[.\n]+', ' ', text.lower()).split()
+            assert all(word in self.custom_word_list for word in words)
+
+    def test_texts(self, faker, num_samples):
+        num_texts = 5
+        num_chars = 25
+        for _ in range(num_samples):
+            texts = faker.texts(
+                max_nb_chars=num_chars, nb_texts=num_texts,
+                ext_word_list=self.custom_word_list,
+            )
+            assert len(texts) == num_texts
+            for text in texts:
+                assert len(text) <= num_chars
+                words = re.sub(r'[.\n]+', ' ', text.lower()).split()
+                assert all(word in self.custom_word_list for word in words)
diff --git a/tests/test_factory.py b/tests/test_factory.py
index 81647681..a8913e72 100644
--- a/tests/test_factory.py
+++ b/tests/test_factory.py
@@ -1,5 +1,4 @@
 import io
-import re
 import string
 import sys
 import unittest
@@ -183,152 +182,6 @@ class FactoryTestCase(unittest.TestCase):
                 self.assertIsInstance(fake.prefix(), str)
                 self.assertIsInstance(fake.suffix(), str)
 
-    def test_no_words_sentence(self):
-        from faker.providers.lorem import Provider
-
-        provider = Provider(self.generator)
-
-        paragraph = provider.paragraph(0)
-        assert paragraph == ''
-
-    def test_words_valueerror(self):
-        fake = Faker()
-        with pytest.raises(ValueError):
-            fake.text(max_nb_chars=4)
-
-    def test_no_words_paragraph(self):
-        from faker.providers.lorem import Provider
-
-        provider = Provider(self.generator)
-
-        sentence = provider.sentence(0)
-        assert sentence == ''
-
-    def test_ext_word_list(self):
-        fake = Faker()
-
-        my_word_list = [
-            'danish',
-            'cheesecake',
-            'sugar',
-            'Lollipop',
-            'wafer',
-            'Gummies',
-            'Jelly',
-            'pie',
-        ]
-        word = fake.word(ext_word_list=my_word_list)
-        assert word in my_word_list
-
-    def test_no_words(self):
-        fake = Faker()
-
-        words = fake.words(0)
-        assert words == []
-
-    def test_some_words(self):
-        fake = Faker()
-
-        num_words = 5
-        words = fake.words(num_words)
-        assert isinstance(words, list)
-        assert len(words) == num_words
-
-        for word in words:
-            assert isinstance(word, str)
-            assert re.match(r'^[a-z].*$', word)
-
-    def test_words_ext_word_list(self):
-        fake = Faker()
-
-        my_word_list = [
-            'danish',
-            'cheesecake',
-            'sugar',
-            'Lollipop',
-            'wafer',
-            'Gummies',
-            'Jelly',
-            'pie',
-        ]
-
-        num_words = 5
-        words = fake.words(5, ext_word_list=my_word_list)
-        assert isinstance(words, list)
-        assert len(words) == num_words
-
-        for word in words:
-            assert isinstance(word, str)
-            assert word in my_word_list
-
-    def test_words_ext_word_list_unique(self):
-        fake = Faker()
-
-        my_word_list = [
-            'danish',
-            'cheesecake',
-            'sugar',
-            'Lollipop',
-            'wafer',
-            'Gummies',
-            'Jelly',
-            'pie',
-        ]
-
-        num_words = 5
-        words = fake.words(5, ext_word_list=my_word_list, unique=True)
-        assert isinstance(words, list)
-        assert len(words) == num_words
-
-        checked_words = []
-        for word in words:
-            assert isinstance(word, str)
-            assert word in my_word_list
-            # Check that word is unique
-            assert word not in checked_words
-            checked_words.append(word)
-
-    def test_unique_words(self):
-        fake = Faker()
-
-        num_words = 20
-        words = fake.words(num_words, unique=True)
-        assert isinstance(words, list)
-        assert len(words) == num_words
-
-        checked_words = []
-        for word in words:
-            assert isinstance(word, str)
-            # Check that word is only letters. No numbers, symbols, etc
-            assert re.match(r'^[a-zA-Z].*$', word)
-            # Check that word list is unique
-            assert word not in checked_words
-            checked_words.append(word)
-
-    def test_texts_count(self):
-        fake = Faker()
-
-        texts_count = 5
-        assert texts_count == len(fake.texts(nb_texts=texts_count))
-
-    def test_texts_chars_count(self):
-        fake = Faker()
-
-        chars_count = 5
-        for faker_text in fake.texts(max_nb_chars=chars_count):
-            assert chars_count >= len(faker_text)
-
-    def test_texts_word_list(self):
-        fake = Faker()
-
-        word_list = [
-            'test',
-            'faker',
-        ]
-        for faker_text in fake.texts(ext_word_list=word_list):
-            for word in word_list:
-                assert word in faker_text.lower()
-
     def test_random_pystr_characters(self):
         from faker.providers.python import Provider
         provider = Provider(self.generator)