[py-svn] r34650 - py/dist/py/test/testing

fijal at codespeak.net fijal at codespeak.net
Thu Nov 16 09:54:21 CET 2006


Author: fijal
Date: Thu Nov 16 09:54:19 2006
New Revision: 34650

Modified:
   py/dist/py/test/testing/test_collect.py
Log:
Added simple test for inequality.


Modified: py/dist/py/test/testing/test_collect.py
==============================================================================
--- py/dist/py/test/testing/test_collect.py	(original)
+++ py/dist/py/test/testing/test_collect.py	Thu Nov 16 09:54:19 2006
@@ -376,3 +376,16 @@
     """))
     col = py.test.collect.Directory(tmp)
     py.test.raises(KeyboardInterrupt, list, col.tryiter())
+
+def test_check_random_inequality():
+    tmp = py.test.ensuretemp("ineq")
+    tmp.ensure("test_x.py").write(py.code.Source("""def test_one():
+        pass
+    """))
+    col = py.test.collect.Directory(tmp)
+    fn = col.tryiter().next()
+    assert fn != 3
+    assert fn != col
+    assert fn != [1,2,3]
+    assert [1,2,3] != fn
+    assert col != fn



More information about the pytest-commit mailing list