def test_name_format(self):
        """Test if the generated name format is as expected."""
        name = self.fake.name()
        name_parts = name.split()
        self.assertGreaterEqual(len(name_parts), 2, "Full name should have at least a first and last name.")
        if len(name_parts) == 2:
            self.assertIn(name_parts[0], EnPKprovider.first_names)
            self.assertIn(name_parts[-1], EnPKprovider.last_names)
        elif len(name_parts) == 4:
            self.assertIn(name_parts[:2], EnPKprovider.first_names)
            self.assertIn(name_parts[2:], EnPKprovider.last_names)
        elif len(name_parts) == 3:
            assert (
                " ".join(name_parts[:2]) in EnPKprovider.first_names
                and " ".join(name_parts[2]) in EnPKprovider.last_names
            ) or (
                " ".join(name_parts[:1]) in EnPKprovider.first_names
                and " ".join(name_parts[1:]) in EnPKprovider.last_names
            ), "Either first two name parts should be in first names, or last two should be in last names."
Test if the generated name format is as expected.
tests/providers/test_person.py