[pypy-svn] rev 2550 - pypy/trunk/src/pypy/tool/testdata

sschwarzer at codespeak.net sschwarzer at codespeak.net
Fri Dec 19 11:58:50 CET 2003


Author: sschwarzer
Date: Fri Dec 19 11:58:49 2003
New Revision: 2550

Added:
   pypy/trunk/src/pypy/tool/testdata/
   pypy/trunk/src/pypy/tool/testdata/__init__.py
   pypy/trunk/src/pypy/tool/testdata/test_dummy.py
Log:
Test module for testing the unit test framework.


Added: pypy/trunk/src/pypy/tool/testdata/__init__.py
==============================================================================

Added: pypy/trunk/src/pypy/tool/testdata/test_dummy.py
==============================================================================
--- (empty file)
+++ pypy/trunk/src/pypy/tool/testdata/test_dummy.py	Fri Dec 19 11:58:49 2003
@@ -0,0 +1,36 @@
+import autopath
+from pypy.tool import newtest
+
+class TestDummy1(newtest.TestCase):
+    def test_success1(self):
+        self.assertEquals(1+1, 2)
+
+    def test_error1(self):
+        raise ValueError
+
+    def test_failure1(self):
+        raise newtest.Failure
+
+
+class TestDummy2(newtest.TestCase):
+    def test_success2(self):
+        self.assertEquals(1+1, 2)
+
+    def test_error2(self):
+        raise ValueError
+
+    def test_failure2(self):
+        raise newtest.Failure
+
+
+class TestSkip1(newtest.TestCase):
+    def setUp(self):
+        raise newtest.Skipped
+
+    def test_skip1(self):
+        pass
+
+
+class TestSkip2(newtest.TestCase):
+    def test_skip2(self):
+        raise newtest.Skipped


More information about the Pypy-commit mailing list