def test_save_load(self):
     tests = [(False, ), (True, )]
     for test in tests:
         test = Spiral(*test)
         saved = test.save()
         loaded = Traversal.load(saved)
         self.assertEqual(test, loaded)
 def test_save_load(self):
     tests = [(0, False), (2, True)]
     for test in tests:
         test = VLines(*test)
         saved = test.save()
         loaded = Traversal.load(saved)
         self.assertEqual(test, loaded)
 def test_save_load(self):
     tests = [((8, 8), True, HLines(reverse=1, line_sentences=True),
               VLines(reverse=2, line_sentences=False))]
     for test in tests:
         test = Blocks(*test)
         saved = test.save()
         loaded = Traversal.load(saved)
         self.assertEqual(test, loaded)
 def setUp(self):
     Traversal.add_class(Lines)
 def test_save_load(self):
     test = Hilbert()
     saved = test.save()
     loaded = Traversal.load(saved)
     self.assertEqual(test, loaded)
 def tearDown(self):
     Traversal.remove_class(Lines)
def test_spiral_save_load(test):
    test = Spiral(*test)
    saved = test.save()
    loaded = Traversal.load(saved)
    assert isinstance(loaded, Spiral)
    assert test == loaded
def test_vlines_save_load(test):
    test = VLines(*test)
    saved = test.save()
    loaded = Traversal.load(saved)
    assert isinstance(loaded, VLines)
    assert test == loaded
def test_blocks_save_load(test):
    test = Blocks(*test)
    saved = test.save()
    loaded = Traversal.load(saved)
    assert isinstance(loaded, Blocks)
    assert test == loaded
def test_hilbert_save_load():
    test = Hilbert()
    saved = test.save()
    loaded = Traversal.load(saved)
    assert isinstance(loaded, Hilbert)
    assert test == loaded