diff options
author | Guido van Rossum <guido@python.org> | 2005-01-16 00:21:28 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2005-01-16 00:21:28 (GMT) |
commit | fee7b93c60310413db31973c13e5abb4c7620ef4 (patch) | |
tree | 6c4638e2c36fc128cd708eb765912e0db17ca72d | |
parent | 75b64e65f10b04e3a2bdac6d0e3db289bbd796cb (diff) | |
download | cpython-fee7b93c60310413db31973c13e5abb4c7620ef4.zip cpython-fee7b93c60310413db31973c13e5abb4c7620ef4.tar.gz cpython-fee7b93c60310413db31973c13e5abb4c7620ef4.tar.bz2 |
Use decorators.
-rw-r--r-- | Lib/test/test_builtin.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 51ef7c6..5aa9197 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -1274,17 +1274,18 @@ class BuiltinTest(unittest.TestCase): self.assertRaises(ValueError, unichr, sys.maxunicode+1) self.assertRaises(TypeError, unichr) + # We don't want self in vars(), so these are static methods + + @staticmethod def get_vars_f0(): return vars() - # we don't want self in vars(), so use staticmethod - get_vars_f0 = staticmethod(get_vars_f0) + @staticmethod def get_vars_f2(): BuiltinTest.get_vars_f0() a = 1 b = 2 return vars() - get_vars_f2 = staticmethod(get_vars_f2) def test_vars(self): self.assertEqual(set(vars()), set(dir())) |