示例#1
0
文件: test_qso.py 项目: jhirniak/uri
    def test_pop_failure(self):
        instance = QSO()

        with pytest.raises(KeyError):
            instance.pop('key')
示例#2
0
文件: test_qso.py 项目: jhirniak/uri
    def test_pop_failures(self, key):
        instance = QSO()

        with pytest.raises(KeyError):
            instance.pop(key)
示例#3
0
文件: test_qso.py 项目: jhirniak/uri
    def test_pop_defaults(self):
        instance = QSO()

        assert instance.pop(default=None) is None
        assert instance.pop(0, None) is None
        assert instance.pop('named', None) is None
示例#4
0
文件: test_qso.py 项目: jhirniak/uri
 def test_pop_examples(self, src, key, expect, value):
     instance = QSO(src)
     result = instance.pop(key)
     assert str(instance) == expect
     assert result == value