diff options
| author | Benjamin Peterson <benjamin@python.org> | 2010-04-11 01:40:32 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2010-04-11 01:40:32 (GMT) |
| commit | a11da59755c27c7a74df90d08f6401b0c96be160 (patch) | |
| tree | 522af7caa4003570062a3f70f14e9cc16e4f6b0e /Lib/test/test_functools.py | |
| parent | ec6393f3808d69f63b510e321947a58df0e0fbb7 (diff) | |
| download | cpython-a11da59755c27c7a74df90d08f6401b0c96be160.zip cpython-a11da59755c27c7a74df90d08f6401b0c96be160.tar.gz cpython-a11da59755c27c7a74df90d08f6401b0c96be160.tar.bz2 | |
add test for class with no operations defined
Diffstat (limited to 'Lib/test/test_functools.py')
| -rw-r--r-- | Lib/test/test_functools.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 05e19b1..6e3533a 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -422,6 +422,12 @@ class TestTotalOrdering(unittest.TestCase): self.assert_(A(2) <= A(2)) self.assert_(A(2) >= A(2)) + def test_no_operations_defined(self): + with self.assertRaises(ValueError): + @functools.total_ordering + class A: + pass + def test_main(verbose=None): test_classes = ( TestPartial, |
