def test_pincodes_in_state(self, faker, num_samples, pincodes):
        """Test `pincodes` for state and union territories"""

        for _ in range(num_samples):
            include_ut = faker.random_element([True, False])
            pincode = getattr(faker, pincodes)(include_union_territories=include_ut)
            assert isinstance(pincode, int)
            assert len(str(pincode)) == 6
Test `pincodes` for state and union territories
tests/providers/test_address.py