python -m nose.core ./integrationtests -v
python -m nose.core ./integrationtests/block
ith_string (unparser_test_case.UnparseCompilerAstTestCase) ... oktest_unary_minus (unparser_test_case.UnparseCompilerAstTestCase) ... oktest_with (unparser_test_case.UnparseCompilerAstTestCase) ... ok======================================================================ERROR: Expressions----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\block_test_case.py", line473, intestself._base('1+2', 3, ())
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\block_test_case.py", line467, in_baseself.assertEqual(value, e.evaluate(dict(mapping)))
File"C:\Users\itziakos\Projects\codetools\codetools\blocks\block.py", line966, inevaluatereturneval(self._code, {}, context)
File"c:\users\itziakos\projects\traits\traits\trait_handlers.py", line109, in_undefined_getname, class_of( object ) )
TraitError: The'_code'traitofanExpressioninstanceisapropertythathasno'get'or'set'method======================================================================FAIL: Doctest: codetools.blocks.analysis.Transformer----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"c:\runtimes\default\lib\doctest.py", line2201, inrunTestraiseself.failureException(self.format_failure(new.getvalue()))
AssertionError: Faileddoctesttestforcodetools.blocks.analysis.TransformerFile"C:\Users\itziakos\Projects\codetools\codetools\blocks\analysis.py", line612, inTransformer----------------------------------------------------------------------File"C:\Users\itziakos\Projects\codetools\codetools\blocks\analysis.py", line616, incodetools.blocks.analysis.TransformerFailedexample:
fromcompiler_.ast.apiimportsimilarExceptionraised:
Traceback (mostrecentcalllast):
File"c:\runtimes\default\lib\doctest.py", line1289, in__runcompileflags, 1) intest.globsFile"<doctest codetools.blocks.analysis.Transformer[1]>", line1, in<module>fromcompiler_.ast.apiimportsimilarImportError: Nomodulenamedast.api----------------------------------------------------------------------File"C:\Users\itziakos\Projects\codetools\codetools\blocks\analysis.py", line618, incodetools.blocks.analysis.TransformerFailedexample:
similar(ast, Transformer().transform(ast))
Exceptionraised:
Traceback (mostrecentcalllast):
File"c:\runtimes\default\lib\doctest.py", line1289, in__runcompileflags, 1) intest.globsFile"<doctest codetools.blocks.analysis.Transformer[3]>", line1, in<module>similar(ast, Transformer().transform(ast))
NameError: name'similar'isnotdefined======================================================================FAIL: Doctest: codetools.blocks.analysis.extract_const_assigns----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"c:\runtimes\default\lib\doctest.py", line2201, inrunTestraiseself.failureException(self.format_failure(new.getvalue()))
AssertionError: Faileddoctesttestforcodetools.blocks.analysis.extract_const_assignsFile"C:\Users\itziakos\Projects\codetools\codetools\blocks\analysis.py", line52, inextract_const_assigns----------------------------------------------------------------------File"C:\Users\itziakos\Projects\codetools\codetools\blocks\analysis.py", line56, incodetools.blocks.analysis.extract_const_assignsFailedexample:
fromcompiler_.ast.apiimportsimilarExceptionraised:
Traceback (mostrecentcalllast):
File"c:\runtimes\default\lib\doctest.py", line1289, in__runcompileflags, 1) intest.globsFile"<doctest codetools.blocks.analysis.extract_const_assigns[1]>", line1, in<module>fromcompiler_.ast.apiimportsimilarImportError: Nomodulenamedast.api----------------------------------------------------------------------File"C:\Users\itziakos\Projects\codetools\codetools\blocks\analysis.py", line58, incodetools.blocks.analysis.extract_const_assignsFailedexample:
similar(ast, parse('a = __a'))
Exceptionraised:
Traceback (mostrecentcalllast):
File"c:\runtimes\default\lib\doctest.py", line1289, in__runcompileflags, 1) intest.globsFile"<doctest codetools.blocks.analysis.extract_const_assigns[3]>", line1, in<module>similar(ast, parse('a = __a'))
NameError: name'similar'isnotdefined======================================================================FAIL: test_function_kwargs_dict_args (analysis_test_case.NameAnalysisTestCase)
----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\analysis_test_case.py", line360, intest_function_kwargs_dict_argsself.assertRaises(TypeError, test_raises, code)
AssertionError: TypeErrornotraised======================================================================FAIL: test_function_varargs_args (analysis_test_case.NameAnalysisTestCase)
----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\analysis_test_case.py", line318, intest_function_varargs_argsself.assertRaises(TypeError, test_raises, code)
AssertionError: TypeErrornotraised======================================================================FAIL: Tracebackshavecorrectfilenamesandlinenumbers----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\block_test_case.py", line332, intest_tracebackstest(tracebacks()[-1], 1, 'foo/a.py')
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\block_test_case.py", line310, intestself.assertEqual(tb.tb_lineno, lineno+1)
AssertionError: 1!=2======================================================================FAIL: test_if2 (unparser_test_case.UnparseCompilerAstTestCase)
----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\unparser_test_case.py", line178, intest_if2self._check_round_trip(code)
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\unparser_test_case.py", line389, in_check_round_tripself.assertEqual(desired.strip(), actual.strip())
AssertionError: 'if True: \n\n x = 4\nelse: \n\n x = 5'!='if True: \n\n x = 4\n\nelse: \n\n x = 5'======================================================================FAIL: test_if3 (unparser_test_case.UnparseCompilerAstTestCase)
----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\unparser_test_case.py", line187, intest_if3self._check_round_trip(code)
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\unparser_test_case.py", line389, in_check_round_tripself.assertEqual(desired.strip(), actual.strip())
AssertionError: 'if True: \n pass\n\nelif False: \n pass\n\nelse: \n pass'!='if True: \n pass\n\nelif False: \n pass\n\n\nelse: \n pass'======================================================================FAIL: testsifblocknestedinelseblock.
----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\unparser_test_case.py", line207, intest_if5self._check_round_trip(code)
File"C:\Users\itziakos\Projects\codetools\integrationtests\blocks\unparser_test_case.py", line389, in_check_round_tripself.assertEqual(desired.strip(), actual.strip())
AssertionError: 'if True: \n pass\n\nelse: \n\n if True: \n pass'!='if True: \n pass\n\n\nelse: \n\n if True: \n pass'----------------------------------------------------------------------Ran137testsin2.158s
Running the integration tests one gets two kind of errors
A. When running
we get
B. When running
we get