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('\\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('\\d{3}-\\d{3}', old_postal_code)