test_parser fails
Tim Rice
tim at multitalents.net
Mon Sep 16 13:09:40 EDT 2002
I'm trying to get Python-2.2.1 working on SCO Open Server 5
I've got most of it working but I'm concerned about the parser moudle
failing the test.
Any tips on where to look?
Thanks.
Here is the output of ./python -E -tt ./Lib/test/test_parser.py -v
test_basic_import_statement (__main__.RoundtripLegalSyntaxTestCase) ... FAIL
test_expressions (__main__.RoundtripLegalSyntaxTestCase) ... FAIL
test_function_defs (__main__.RoundtripLegalSyntaxTestCase) ... FAIL
test_import_from_statement (__main__.RoundtripLegalSyntaxTestCase) ... FAIL
test_print (__main__.RoundtripLegalSyntaxTestCase) ... FAIL
test_simple_assignments (__main__.RoundtripLegalSyntaxTestCase) ... FAIL
test_simple_augmented_assignments (__main__.RoundtripLegalSyntaxTestCase) ... FAIL
test_simple_expression (__main__.RoundtripLegalSyntaxTestCase) ... FAIL
test_yield_statement (__main__.RoundtripLegalSyntaxTestCase) ... FAIL
Illegal input: a,,c ... ok
Illegal input: a $= b ... ok
Illegal yield statement: def f(): return 1; yield 1 ... ok
Illegal return in generator: def f(): return 1; yield 1 ... ok
test_junk (__main__.IllegalSyntaxTestCase) ... ok
Illegal input: print >>fp, ... ok
======================================================================
FAIL: test_basic_import_statement (__main__.RoundtripLegalSyntaxTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./Lib/test/test_parser.py", line 129, in test_basic_import_statement
self.check_suite("import sys")
File "./Lib/test/test_parser.py", line 27, in check_suite
self.roundtrip(parser.suite, s)
File "./Lib/test/test_parser.py", line 18, in roundtrip
self.fail("could not roundtrip %r" % s)
File "/usr/local/src/utils/Python-2.2.1/Lib/unittest.py", line 254, in fail
raise self.failureException, msg
AssertionError: could not roundtrip 'import sys'
======================================================================
FAIL: test_expressions (__main__.RoundtripLegalSyntaxTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./Lib/test/test_parser.py", line 42, in test_expressions
self.check_expr("foo(1)")
File "./Lib/test/test_parser.py", line 24, in check_expr
self.roundtrip(parser.expr, s)
File "./Lib/test/test_parser.py", line 18, in roundtrip
self.fail("could not roundtrip %r" % s)
File "/usr/local/src/utils/Python-2.2.1/Lib/unittest.py", line 254, in fail
raise self.failureException, msg
AssertionError: could not roundtrip 'foo(1)'
======================================================================
FAIL: test_function_defs (__main__.RoundtripLegalSyntaxTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./Lib/test/test_parser.py", line 100, in test_function_defs
self.check_suite("def f(): pass")
File "./Lib/test/test_parser.py", line 27, in check_suite
self.roundtrip(parser.suite, s)
File "./Lib/test/test_parser.py", line 18, in roundtrip
self.fail("could not roundtrip %r" % s)
File "/usr/local/src/utils/Python-2.2.1/Lib/unittest.py", line 254, in fail
raise self.failureException, msg
AssertionError: could not roundtrip 'def f(): pass'
======================================================================
FAIL: test_import_from_statement (__main__.RoundtripLegalSyntaxTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./Lib/test/test_parser.py", line 119, in test_import_from_statement
self.check_suite("from sys.path import *")
File "./Lib/test/test_parser.py", line 27, in check_suite
self.roundtrip(parser.suite, s)
File "./Lib/test/test_parser.py", line 18, in roundtrip
self.fail("could not roundtrip %r" % s)
File "/usr/local/src/utils/Python-2.2.1/Lib/unittest.py", line 254, in fail
raise self.failureException, msg
AssertionError: could not roundtrip 'from sys.path import *'
======================================================================
FAIL: test_print (__main__.RoundtripLegalSyntaxTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./Lib/test/test_parser.py", line 71, in test_print
self.check_suite("print")
File "./Lib/test/test_parser.py", line 27, in check_suite
self.roundtrip(parser.suite, s)
File "./Lib/test/test_parser.py", line 18, in roundtrip
self.fail("could not roundtrip %r" % s)
File "/usr/local/src/utils/Python-2.2.1/Lib/unittest.py", line 254, in fail
raise self.failureException, msg
AssertionError: could not roundtrip 'print'
======================================================================
FAIL: test_simple_assignments (__main__.RoundtripLegalSyntaxTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./Lib/test/test_parser.py", line 83, in test_simple_assignments
self.check_suite("a = b")
File "./Lib/test/test_parser.py", line 27, in check_suite
self.roundtrip(parser.suite, s)
File "./Lib/test/test_parser.py", line 18, in roundtrip
self.fail("could not roundtrip %r" % s)
File "/usr/local/src/utils/Python-2.2.1/Lib/unittest.py", line 254, in fail
raise self.failureException, msg
AssertionError: could not roundtrip 'a = b'
======================================================================
FAIL: test_simple_augmented_assignments (__main__.RoundtripLegalSyntaxTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./Lib/test/test_parser.py", line 87, in test_simple_augmented_assignments
self.check_suite("a += b")
File "./Lib/test/test_parser.py", line 27, in check_suite
self.roundtrip(parser.suite, s)
File "./Lib/test/test_parser.py", line 18, in roundtrip
self.fail("could not roundtrip %r" % s)
File "/usr/local/src/utils/Python-2.2.1/Lib/unittest.py", line 254, in fail
raise self.failureException, msg
AssertionError: could not roundtrip 'a += b'
======================================================================
FAIL: test_simple_expression (__main__.RoundtripLegalSyntaxTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./Lib/test/test_parser.py", line 80, in test_simple_expression
self.check_suite("a")
File "./Lib/test/test_parser.py", line 27, in check_suite
self.roundtrip(parser.suite, s)
File "./Lib/test/test_parser.py", line 18, in roundtrip
self.fail("could not roundtrip %r" % s)
File "/usr/local/src/utils/Python-2.2.1/Lib/unittest.py", line 254, in fail
raise self.failureException, msg
AssertionError: could not roundtrip 'a'
======================================================================
FAIL: test_yield_statement (__main__.RoundtripLegalSyntaxTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./Lib/test/test_parser.py", line 30, in test_yield_statement
self.check_suite("from __future__ import generators\n"
File "./Lib/test/test_parser.py", line 27, in check_suite
self.roundtrip(parser.suite, s)
File "./Lib/test/test_parser.py", line 18, in roundtrip
self.fail("could not roundtrip %r" % s)
File "/usr/local/src/utils/Python-2.2.1/Lib/unittest.py", line 254, in fail
raise self.failureException, msg
AssertionError: could not roundtrip 'from __future__ import generators\ndef f(): yield 1'
----------------------------------------------------------------------
Ran 15 tests in 0.130s
FAILED (failures=9)
Traceback (most recent call last):
File "./Lib/test/test_parser.py", line 365, in ?
test_main()
File "./Lib/test/test_parser.py", line 361, in test_main
test_support.run_suite(suite)
File "./Lib/test/test_support.py", line 174, in run_suite
raise TestFailed(msg)
test_support.TestFailed: errors occurred; run in verbose mode for details
--
Tim Rice Multitalents (707) 887-1469
tim at multitalents.net
More information about the Python-list
mailing list