diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/output/test_class | 2 | ||||
-rw-r--r-- | Lib/test/output/test_tokenize | 8 | ||||
-rw-r--r-- | Lib/test/test_bsddb3.py | 2 | ||||
-rw-r--r-- | Lib/test/test_class.py | 2 | ||||
-rw-r--r-- | Lib/test/test_funcattrs.py | 20 | ||||
-rw-r--r-- | Lib/test/test_grammar.py | 7 | ||||
-rw-r--r-- | Lib/test/test_socket.py | 2 | ||||
-rwxr-xr-x | Lib/test/test_wsgiref.py | 4 | ||||
-rw-r--r-- | Lib/test/tokenize_tests.txt | 8 |
9 files changed, 25 insertions, 30 deletions
diff --git a/Lib/test/output/test_class b/Lib/test/output/test_class index 7d8ab5e..f3dc490 100644 --- a/Lib/test/output/test_class +++ b/Lib/test/output/test_class @@ -55,12 +55,10 @@ __eq__: (1,) __lt__: (1,) __gt__: (1,) __ne__: (1,) -__ne__: (1,) __eq__: (1,) __gt__: (1,) __lt__: (1,) __ne__: (1,) -__ne__: (1,) __del__: () __getattr__: ('spam',) __setattr__: ('eggs', 'spam, spam, spam and ham') diff --git a/Lib/test/output/test_tokenize b/Lib/test/output/test_tokenize index b78a223..edd39bf 100644 --- a/Lib/test/output/test_tokenize +++ b/Lib/test/output/test_tokenize @@ -108,11 +108,11 @@ test_tokenize 37,0-37,1: NL '\n' 38,0-38,20: COMMENT '# Ordinary integers\n' 39,0-39,4: NUMBER '0xff' -39,5-39,7: OP '<>' +39,5-39,7: OP '!=' 39,8-39,11: NUMBER '255' 39,11-39,12: NEWLINE '\n' 40,0-40,4: NUMBER '0377' -40,5-40,7: OP '<>' +40,5-40,7: OP '!=' 40,8-40,11: NUMBER '255' 40,11-40,12: NEWLINE '\n' 41,0-41,10: NUMBER '2147483647' @@ -484,7 +484,7 @@ test_tokenize 149,2-149,3: OP ',' 149,4-149,5: NAME 'y' 149,5-149,6: OP ')' -149,7-149,9: OP '<>' +149,7-149,9: OP '!=' 149,10-149,11: OP '(' 149,11-149,12: OP '{' 149,12-149,15: STRING "'a'" @@ -513,7 +513,7 @@ test_tokenize 152,21-152,22: NUMBER '1' 152,23-152,25: OP '<=' 152,26-152,27: NUMBER '1' -152,28-152,30: OP '<>' +152,28-152,30: OP '!=' 152,31-152,32: NUMBER '1' 152,33-152,35: OP '!=' 152,36-152,37: NUMBER '1' diff --git a/Lib/test/test_bsddb3.py b/Lib/test/test_bsddb3.py index 8b0c50c..166ad03 100644 --- a/Lib/test/test_bsddb3.py +++ b/Lib/test/test_bsddb3.py @@ -8,7 +8,7 @@ from test.test_support import requires, verbose, run_suite, unlink # When running as a script instead of within the regrtest framework, skip the # requires test, since it's obvious we want to run them. -if __name__ <> '__main__': +if __name__ != '__main__': requires('bsddb') verbose = False diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py index 66f4265..795acd9 100644 --- a/Lib/test/test_class.py +++ b/Lib/test/test_class.py @@ -244,12 +244,10 @@ str(testme) testme == 1 testme < 1 testme > 1 -testme <> 1 testme != 1 1 == testme 1 < testme 1 > testme -1 <> testme 1 != testme # This test has to be last (duh.) diff --git a/Lib/test/test_funcattrs.py b/Lib/test/test_funcattrs.py index 7a083b7..ab33528 100644 --- a/Lib/test/test_funcattrs.py +++ b/Lib/test/test_funcattrs.py @@ -19,16 +19,16 @@ try: except AttributeError: pass else: raise TestFailed, 'expected AttributeError' -if b.__dict__ <> {}: +if b.__dict__ != {}: raise TestFailed, 'expected unassigned func.__dict__ to be {}' b.publish = 1 -if b.publish <> 1: +if b.publish != 1: raise TestFailed, 'function attribute not set to expected value' docstring = 'its docstring' b.__doc__ = docstring -if b.__doc__ <> docstring: +if b.__doc__ != docstring: raise TestFailed, 'problem with setting __doc__ attribute' if 'publish' not in dir(b): @@ -49,7 +49,7 @@ d = {'hello': 'world'} b.__dict__ = d if b.func_dict is not d: raise TestFailed, 'func.__dict__ assignment to dictionary failed' -if b.hello <> 'world': +if b.hello != 'world': raise TestFailed, 'attribute after func.__dict__ assignment failed' f1 = F() @@ -75,13 +75,13 @@ else: raise TestFailed, 'expected AttributeError or TypeError' # But setting it explicitly on the underlying function object is okay. F.a.im_func.publish = 1 -if F.a.publish <> 1: +if F.a.publish != 1: raise TestFailed, 'unbound method attribute not set to expected value' -if f1.a.publish <> 1: +if f1.a.publish != 1: raise TestFailed, 'bound method attribute access did not work' -if f2.a.publish <> 1: +if f2.a.publish != 1: raise TestFailed, 'bound method attribute access did not work' if 'publish' not in dir(F.a): @@ -117,7 +117,7 @@ else: raise TestFailed, 'expected TypeError or AttributeError' F.a.im_func.__dict__ = {'one': 11, 'two': 22, 'three': 33} -if f1.a.two <> 22: +if f1.a.two != 22: raise TestFailed, 'setting __dict__' from UserDict import UserDict @@ -128,7 +128,7 @@ try: except (AttributeError, TypeError): pass else: raise TestFailed -if f2.a.one <> f1.a.one <> F.a.one <> 11: +if f2.a.one != f1.a.one != F.a.one != 11: raise TestFailed # im_func may not be a Python method! @@ -136,7 +136,7 @@ import new F.id = new.instancemethod(id, None, F) eff = F() -if eff.id() <> id(eff): +if eff.id() != id(eff): raise TestFailed try: diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 458bfa2..0ce43dc 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -412,7 +412,7 @@ def test_break_continue_loop(extra_burning_oil = 1, count=0): continue except: raise - if count > 2 or big_hippo <> 1: + if count > 2 or big_hippo != 1: print "continue then break in try/except in loop broken!" test_break_continue_loop() @@ -586,12 +586,11 @@ if 1 and 1 or 1 and 1 and 1 or not 1 and 1: pass print 'comparison' ### comparison: expr (comp_op expr)* -### comp_op: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'in'|'not' 'in'|'is'|'is' 'not' +### comp_op: '<'|'>'|'=='|'>='|'<='|'!='|'in'|'not' 'in'|'is'|'is' 'not' if 1: pass x = (1 == 1) if 1 == 1: pass if 1 != 1: pass -if 1 <> 1: pass if 1 < 1: pass if 1 > 1: pass if 1 <= 1: pass @@ -600,7 +599,7 @@ if 1 is 1: pass if 1 is not 1: pass if 1 in (): pass if 1 not in (): pass -if 1 < 1 > 1 == 1 >= 1 <= 1 <> 1 != 1 in 1 not in 1 is 1 is not 1: pass +if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 in 1 not in 1 is 1 is not 1: pass print 'binary mask ops' x = 1 & 1 diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 356b801..df37f73 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -285,7 +285,7 @@ class GeneralModuleTests(unittest.TestCase): orig = sys.getrefcount(__name__) socket.getnameinfo(__name__,0) except SystemError: - if sys.getrefcount(__name__) <> orig: + if sys.getrefcount(__name__) != orig: self.fail("socket.getnameinfo loses a reference") def testInterpreterCrash(self): diff --git a/Lib/test/test_wsgiref.py b/Lib/test/test_wsgiref.py index b42f437..f33c30d 100755 --- a/Lib/test/test_wsgiref.py +++ b/Lib/test/test_wsgiref.py @@ -515,7 +515,7 @@ class HandlerTests(TestCase): "Content-Length: %d\r\n" "\r\n%s" % (h.error_status,len(h.error_body),h.error_body)) - self.failUnless(h.stderr.getvalue().find("AssertionError")<>-1) + self.failUnless("AssertionError" in h.stderr.getvalue()) def testErrorAfterOutput(self): MSG = "Some output has been sent" @@ -528,7 +528,7 @@ class HandlerTests(TestCase): self.assertEqual(h.stdout.getvalue(), "Status: 200 OK\r\n" "\r\n"+MSG) - self.failUnless(h.stderr.getvalue().find("AssertionError")<>-1) + self.failUnless("AssertionError" in h.stderr.getvalue()) def testHeaderFormats(self): diff --git a/Lib/test/tokenize_tests.txt b/Lib/test/tokenize_tests.txt index 4ef3bf1..59e51d7 100644 --- a/Lib/test/tokenize_tests.txt +++ b/Lib/test/tokenize_tests.txt @@ -36,8 +36,8 @@ x = 1 \ x = 0 # Ordinary integers -0xff <> 255 -0377 <> 255 +0xff != 255 +0377 != 255 2147483647 != 017777777777 -2147483647-1 != 020000000000 037777777777 != -1 @@ -146,10 +146,10 @@ if 0: def d22(a, b, c=1, d=2): pass def d01v(a=1, *restt, **restd): pass -(x, y) <> ({'a':1}, {'b':2}) +(x, y) != ({'a':1}, {'b':2}) # comparison -if 1 < 1 > 1 == 1 >= 1 <= 1 <> 1 != 1 in 1 not in 1 is 1 is not 1: pass +if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 != 1 in 1 not in 1 is 1 is not 1: pass # binary x = 1 & 1 |