Commits

rkruppe committed 9d6a2a9

Remove/revive dead code

Comments (0)

Files changed (3)

ttgx/meta/tests/test_yaml.py

     args.extend(more_args)
     for i in range(len(vals)):
         vals[i] += more_vals[i]
-    if len(args) == 1:
-        metafunc.parametrize(args[0], vals[0], ids=ids)
-    else:
-        metafunc.parametrize(args, vals, ids=ids)
+    assert len(args) > 1
+    metafunc.parametrize(args, vals, ids=ids)
 
 
 class TestMinimal:
 
     def __repr__(self):
         def parts():
-            yield 'rawbuf.Array['
-            yield from map(str, self._buf)
+            yield 'Array['
+            yield from map(str, self)
             yield ']'
         return ' '.join(parts())
 

ttgx/tests/test_rawbuf.py

     def test_get_between_length_and_capacity_raises(self, arr):
         raises(IndexError, getitem, arr, 6)
 
-    def test_get_between_length_and_capacity_raises(self, arr):
+    def test_set_between_length_and_capacity_raises(self, arr):
         raises(IndexError, setitem, arr, 6, _x(arr))
 
     def test_remove(self, arr):
         assert removed == _x(arr)
         raises(IndexError, getitem, arr, 4)
 
+    def test_repr(self, arr):
+        for i in range(5):
+            arr[i] = _x(arr)
+        arr[1] = _y(arr)
+        expected = 'Array[ {0} {1} {0} {0} {0} ]'.format(_x(arr), _y(arr))
+        assert repr(arr) == expected
+