Exemple #1
0
 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
Exemple #2
0
 def test_clash(self):
     subs = set()
     for i in range(100):
         sub = util.generate_subsession()
         assert sub not in subs
         subs.add(sub)