Пример #1
0
 def test_invalid(self, s):
     with pytest.raises(TypeError):
         _ = utils.to_unicode(s)
Пример #2
0
def test_to_unicode():
    for obj in STRINGS:
        assert isinstance(utils.to_unicode(obj), str)
    for obj in NOT_STRINGS:
        with pytest.raises(TypeError):
            utils.to_unicode(obj)
Пример #3
0
 def test_valid(self, s):
     assert isinstance(utils.to_unicode(s), str)
Пример #4
0
def test_repr():
    assert utils.to_unicode(str(DATASET)).startswith("Dataset")