def test_roundtrip(self): for i in range(100): sub = util.generate_subsession() dump = util.dump_subsession(sub) assert util.issubsession(dump) parsed = util.parse_subsession(dump) assert sub == parsed
def test_invalid(self): py.test.raises(TypeError, util.issubsession, None) py.test.raises(TypeError, util.issubsession, 10) assert not util.issubsession('invalid')