How to use the uszipcode.searchengine.Zipcode function in uszipcode

To help you get started, we’ve selected a few uszipcode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MacHu-GWU / uszipcode-project / tests / test_searchengine.py View on Github external
def test_init(self):
        z = Zipcode(Zipcode="10001")
        assert z.Zipcode == "10001"
        assert z.ZipcodeType is None
github MacHu-GWU / uszipcode-project / tests / test_searchengine.py View on Github external
def test_hash(self):
        z1 = Zipcode(Zipcode="10001")
        z2 = Zipcode(Zipcode="10001")
        assert hash(z1) == hash(z2)
        assert hash(Zipcode())

        s = set([z1, z2])
        assert len(s) == 1
github MacHu-GWU / uszipcode-project / tests / test_searchengine.py View on Github external
def test_hash(self):
        z1 = Zipcode(Zipcode="10001")
        z2 = Zipcode(Zipcode="10001")
        assert hash(z1) == hash(z2)
        assert hash(Zipcode())

        s = set([z1, z2])
        assert len(s) == 1
github MacHu-GWU / uszipcode-project / tests / test_searchengine.py View on Github external
def test_compare(self):
        z1 = Zipcode(Zipcode="10001")
        z2 = Zipcode(Zipcode="10002")
        z3 = Zipcode()

        assert z1 == z1
        assert z1 != z2
        assert z1 < z2
        assert z2 >= z1

        with pytest.raises(ValueError):
            z1 > z3
        with pytest.raises(ValueError):
            z3 > z3
github MacHu-GWU / uszipcode-project / tests / test_searchengine.py View on Github external
def test_output(self):
        z = Zipcode(Zipcode="10001", ZipcodeType="Standard")
github MacHu-GWU / uszipcode-project / tests / test_searchengine.py View on Github external
def test_hash(self):
        z1 = Zipcode(Zipcode="10001")
        z2 = Zipcode(Zipcode="10001")
        assert hash(z1) == hash(z2)
        assert hash(Zipcode())

        s = set([z1, z2])
        assert len(s) == 1
github MacHu-GWU / uszipcode-project / tests / test_searchengine.py View on Github external
def test_compare(self):
        z1 = Zipcode(Zipcode="10001")
        z2 = Zipcode(Zipcode="10002")
        z3 = Zipcode()

        assert z1 == z1
        assert z1 != z2
        assert z1 < z2
        assert z2 >= z1

        with pytest.raises(ValueError):
            z1 > z3
        with pytest.raises(ValueError):
            z3 > z3
github MacHu-GWU / uszipcode-project / tests / test_searchengine.py View on Github external
def test_compare(self):
        z1 = Zipcode(Zipcode="10001")
        z2 = Zipcode(Zipcode="10002")
        z3 = Zipcode()

        assert z1 == z1
        assert z1 != z2
        assert z1 < z2
        assert z2 >= z1

        with pytest.raises(ValueError):
            z1 > z3
        with pytest.raises(ValueError):
            z3 > z3