diff options
| author | John Anderson <sontek@gmail.com> | 2014-12-26 23:19:32 -0800 |
|---|---|---|
| committer | John Anderson <sontek@gmail.com> | 2014-12-26 23:19:32 -0800 |
| commit | 03a0d79306b2846313df1983a721d5cccf4ec3ce (patch) | |
| tree | 019af9f318dc6acab1f2a7004c5f02d6a2b0586f | |
| parent | 6d4676137885f63f364a2b2ae6205c6931a57220 (diff) | |
| download | pyramid-03a0d79306b2846313df1983a721d5cccf4ec3ce.tar.gz pyramid-03a0d79306b2846313df1983a721d5cccf4ec3ce.tar.bz2 pyramid-03a0d79306b2846313df1983a721d5cccf4ec3ce.zip | |
Clean up compat tests
| -rw-r--r-- | pyramid/tests/test_compat.py | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/pyramid/tests/test_compat.py b/pyramid/tests/test_compat.py index 2f80100dd..23ccce82e 100644 --- a/pyramid/tests/test_compat.py +++ b/pyramid/tests/test_compat.py @@ -1,46 +1,26 @@ import unittest +from pyramid.compat import is_unbound_method class TestUnboundMethods(unittest.TestCase): def test_old_style_bound(self): - from pyramid.compat import is_unbound_method - - class OldStyle: - def run(self): - return 'OK' - self.assertFalse(is_unbound_method(OldStyle().run)) def test_new_style_bound(self): - from pyramid.compat import is_unbound_method - - class NewStyle(object): - def run(self): - return 'OK' - self.assertFalse(is_unbound_method(NewStyle().run)) def test_old_style_unbound(self): - from pyramid.compat import is_unbound_method - - class OldStyle: - def run(self): - return 'OK' - self.assertTrue(is_unbound_method(OldStyle.run)) def test_new_style_unbound(self): - from pyramid.compat import is_unbound_method - - class NewStyle(object): - def run(self): - return 'OK' - self.assertTrue(is_unbound_method(NewStyle.run)) def test_normal_func_unbound(self): - from pyramid.compat import is_unbound_method - - def func(): - return 'OK' + def func(): return 'OK' self.assertFalse(is_unbound_method(func)) + +class OldStyle: + def run(self): return 'OK' + +class NewStyle(object): + def run(self): return 'OK' |
