Bläddra i källkod

tests: fix broken test case, add more WeakNodePath comparisons

rdb 7 år sedan
förälder
incheckning
ddc45e3529
2 ändrade filer med 12 tillägg och 4 borttagningar
  1. 8 0
      tests/pgraph/test_nodepath.py
  2. 4 4
      tests/putil/test_updateseq.py

+ 8 - 0
tests/pgraph/test_nodepath.py

@@ -91,6 +91,14 @@ def test_weak_nodepath_comparison():
     assert weak == path
     assert weak <= path
     assert path <= weak
+    assert weak >= path
+    assert path >= weak
+    assert not (path != weak)
+    assert not (weak != path)
+    assert not (weak > path)
+    assert not (path > weak)
+    assert not (weak < path)
+    assert not (path < weak)
 
     assert hash(path) == hash(weak)
     assert weak.get_node_path() == path

+ 4 - 4
tests/putil/test_updateseq.py

@@ -63,11 +63,11 @@ def test_updateseq_fresh():
 
     old = UpdateSeq.old()
     assert not (seq == old)
-    assert not (seq >= old)
-    assert not (seq > old)
+    assert not (seq <= old)
+    assert not (seq < old)
     assert seq != old
-    assert seq <= old
-    assert seq < old
+    assert seq >= old
+    assert seq > old
 
 
 def test_updateseq_old():