summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pyclbr.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-01-08 19:04:16 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-01-08 19:04:16 (GMT)
commitce8e33a095030e7af94f58f9da196b240bdf0476 (patch)
treeb0ba50cbb6e85c6be6f6e6a870e4232be50a0f9c /Lib/test/test_pyclbr.py
parent3ddc435af6873c6304058d7bcbcb19ee4fba7781 (diff)
downloadcpython-ce8e33a095030e7af94f58f9da196b240bdf0476.zip
cpython-ce8e33a095030e7af94f58f9da196b240bdf0476.tar.gz
cpython-ce8e33a095030e7af94f58f9da196b240bdf0476.tar.bz2
Reverting the Revision: 77368. I committed Flox's big patch for tests by
mistake. ( It may come in for sure tough)
Diffstat (limited to 'Lib/test/test_pyclbr.py')
-rw-r--r--Lib/test/test_pyclbr.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py
index 5bac62a..ec818d1 100644
--- a/Lib/test/test_pyclbr.py
+++ b/Lib/test/test_pyclbr.py
@@ -2,7 +2,7 @@
Test cases for pyclbr.py
Nick Mathewson
'''
-from test.test_support import run_unittest, import_module
+from test.test_support import run_unittest
import sys
from types import ClassType, FunctionType, MethodType, BuiltinFunctionType
import pyclbr
@@ -13,8 +13,6 @@ ClassMethodType = type(classmethod(lambda c: None))
# This next line triggers an error on old versions of pyclbr.
-# Silence Py3k warning
-import_module('commands', deprecated=True)
from commands import getstatus
# Here we test the python class browser code.
@@ -42,11 +40,11 @@ class PyclbrTest(TestCase):
def assertHaskey(self, obj, key, ignore):
- ''' succeed iff key in obj or key in ignore. '''
+ ''' succeed iff obj.has_key(key) or key in ignore. '''
if key in ignore: return
- if key not in obj:
- print >>sys.stderr, "***", key
- self.assertTrue(key in obj)
+ if not obj.has_key(key):
+ print >>sys.stderr, "***",key
+ self.assertTrue(obj.has_key(key))
def assertEqualsOrIgnored(self, a, b, ignore):
''' succeed iff a == b or a in ignore or b in ignore '''
@@ -151,9 +149,7 @@ class PyclbrTest(TestCase):
def test_easy(self):
self.checkModule('pyclbr')
self.checkModule('doctest', ignore=("DocTestCase",))
- # Silence Py3k warning
- rfc822 = import_module('rfc822', deprecated=True)
- self.checkModule('rfc822', rfc822)
+ self.checkModule('rfc822')
self.checkModule('difflib')
def test_decorators(self):