classification
Title: test_trace not symlink install clean
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.3
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, ezio.melotti
Priority: normal Keywords:

Created on 2011-03-09 12:26 by sdaoden, last changed 2014-06-27 21:37 by ned.deily. This issue is now closed.

Messages (6)
msg130452 - (view) Author: Steffen Daode Nurpmeso (sdaoden) Date: 2011-03-09 12:26
I'm now using a completely brain-damaged way to have two 3.x python(1)s
installed: symlinks; i.e. 3.2rc2 is ~/usr/opt/.py-3.2rc2 and tip is
~/usr/opt/.cpython.  Whenever i need to test the thing i'm working on
in my free time with the old version i'm temporarily replacing a
~/usr/opt/py3k symlink (which points to .cpython otherwise).
(I'm doing this because only py3k is in $PATH, $LD_LIBRARY_PATH etc.,
but like i said...)

I don't know if you consider this to be misbehaviour, but a
moment ago i've run the test suite on an installed python(1) tip
and got these symlink-path is not --prefix-path related errors,
just if anyone is concerned (stripping output a bit):

======================================================================
FAIL: test_getsourcefile (test.test_inspect.TestRetrievingSourceCode)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_inspect.py", line 279, in test_getsourcefile
    self.assertEqual(normcase(inspect.getsourcefile(mod.spam)), modfile)
AssertionError: '/Users/steffen/usr/opt/.cpython/lib/python3.3/test/inspect_fodder.py' != '/Users/steffen/usr/opt/py3k/lib/python3.3/test/inspect_fodder.py'
- /Users/steffen/usr/opt/.cpython/lib/python3.3/test/inspect_fodder.py
?                        --  ^^^^
+ /Users/steffen/usr/opt/py3k/lib/python3.3/test/inspect_fodder.py
?                          ^^

======================================================================
FAIL: test_findsource_code_in_linecache (test.test_inspect.TestBuggyCases)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_inspect.py", line 387, in test_findsource_code_in_linecache
    self.assertRaises(IOError, inspect.findsource, co)
AssertionError: IOError not raised by findsource

======================================================================
FAIL: test_stack (test.test_inspect.TestInterpreterStack)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_inspect.py", line 163, in test_stack
    (modfile, 16, 'eggs', ['    st = inspect.stack()\n'], 0))
AssertionError: Tuples differ: ('/Users/steffen/usr/opt/.cpyt... != ('/Users/steffen/usr/opt/py3k/...

First differing element 0:
/Users/steffen/usr/opt/.cpython/lib/python3.3/test/inspect_fodder.py
/Users/steffen/usr/opt/py3k/lib/python3.3/test/inspect_fodder.py

- ('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/inspect_fodder.py',
?                          --  ^^^^

+ ('/Users/steffen/usr/opt/py3k/lib/python3.3/test/inspect_fodder.py',
?                            ^^

======================================================================
FAIL: test_trace (test.test_inspect.TestInterpreterStack)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_inspect.py", line 174, in test_trace
    (modfile, 43, 'argue', ['            spam(a, b, c)\n'], 0))
AssertionError: Tuples differ: ('/Users/steffen/usr/opt/.cpyt... != ('/Users/steffen/usr/opt/py3k/...

First differing element 0:
/Users/steffen/usr/opt/.cpython/lib/python3.3/test/inspect_fodder.py
/Users/steffen/usr/opt/py3k/lib/python3.3/test/inspect_fodder.py

- ('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/inspect_fodder.py',
?                          --  ^^^^

+ ('/Users/steffen/usr/opt/py3k/lib/python3.3/test/inspect_fodder.py',
?                            ^^

...

======================================================================
FAIL: test_loop_caller_importing (test.test_trace.TestCallers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py", line 286, in test_loop_caller_importing
    self.assertEqual(self.tracer.results().callers, expected)
AssertionError: {(('/Users/steffen/usr/opt/.cpython/lib/python3.3/trace.py', 'trace', 'Trace.run [truncated]... != {(('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 'test_trace', [truncated]...
msg130460 - (view) Author: Steffen Daode Nurpmeso (sdaoden) Date: 2011-03-09 19:59
This sounds even more silly now, but i can't reproduce the problem 
any more! 
I could do so easily this noon, before i've opened this issue! 
You *do* see the tracebacks!

I wanted to (try to) write a patch (use os.path.realpath()), but 
even with drop of __pycache__'s, complete recompiles and 
reinstallations: i can't reproduce these faults. 
I've neither updated my repo, nor have i done anything else. 
The options are the same, too (python3 -E -Wd -m test -r -w). 

I leave this issue open until tomorrow noon, maybe someone with 
glue reads it and has one or two minutes to give me a hint on what 
is happening here.  (Thank you!) 
I'll close it, then?!
msg130499 - (view) Author: Steffen Daode Nurpmeso (sdaoden) Date: 2011-03-10 11:01
So, nobody.  I still can't find a way to reproduce the errors, so.
I also get occasional errors when building _multiprocessor, which
disappear when (removing _multiprocessor_failed.so and) simply
running make all once again.
I thought about providing the patch anyway, but it is maybe better
to simply close this issue (in the meanwhile).
msg130809 - (view) Author: Steffen Daode Nurpmeso (sdaoden) Date: 2011-03-14 13:09
It happened again.

13:27 ~/src/cpython $ ./python.exe -E -Wd -m test -r -w
== CPython 3.3a0 (default:a49bda5ff3d5, Mar 14 2011, 13:24:44) [GCC 4.2.1 (Apple Inc. build 5664)]
==   Darwin-10.6.0-i386-64bit little-endian
[...]
326 tests OK.
1 test altered the execution environment:
    test_site
23 tests skipped:
[...]
Those skips are all expected on darwin.
[1167563 refs]


13:33 ~/usr/opt $ python3 -E -Wd -m test -r -w
== CPython 3.3a0 (default:a49bda5ff3d5, Mar 14 2011, 13:24:44) [GCC 4.2.1 (Apple Inc. build 5664)]
==   Darwin-10.6.0-i386-64bit little-endian
[...]
325 tests OK.
2 tests failed:
    test_inspect test_trace
23 tests skipped:
[...]
Those skips are all expected on darwin.
Re-running failed tests in verbose mode
[...]
Diff is 2168 characters long. Set self.maxDiff to None to see it.
[1170964 refs]

The very same messages as in msg130452!
I'll try to write a patch which uses realpath() this evening
or so, and if this works i'll upload it.
Someone should take care about that, then, i think ...

B-) -- now this:

14:06 ~/usr/opt $ python3 -E -Wd -m test -r -w test_inspect test_trace
Using random seed 9018489
[1/2] test_inspect
[2/2] test_trace
All 2 tests OK.
[113082 refs]
msg131112 - (view) Author: Steffen Daode Nurpmeso (sdaoden) Date: 2011-03-16 13:42
Signore Melotti, i'm making you nosy because you're the one
which committed to this file last (db7385).

I've tried a bit to write a patch, but my simple os.path.realpath()
solution didn't work.  I've got no idea of the test framework,
nor of the tracer, so i'm the wrong person here anyway.
(It would have been interesting why test_trace.py fails when run
as part of the test suite, but succeeds if called directly,
even from within the same directory.)
Once again i attach failed test output.

Please decide if this issue is to be closed or not,
i can't help at all.


12:49 ~/usr/opt $ python3 -E -Wd -m test -r -w
== CPython 3.3a0 (default:a064cca38425, Mar 16 2011, 12:14:52) [GCC 4.2.1 (Apple Inc. build 5664)]
==   Darwin-10.6.0-i386-64bit little-endian
[...]
326 tests OK.
1 test failed:
    test_trace

Re-running failed tests in verbose mode
Re-running test 'test_trace' in verbose mode
test_loop_caller_importing (test.test_trace.TestCallers) ... FAIL
test_coverage (test.test_trace.TestCoverage) ... ok
test_coverage_ignore (test.test_trace.TestCoverage) ... ok
test_issue9936 (test.test_trace.TestCoverage) ... ok
test_inst_method_calling (test.test_trace.TestFuncs) ... FAIL
test_loop_caller_importing (test.test_trace.TestFuncs) ... FAIL
test_simple_caller (test.test_trace.TestFuncs) ... FAIL
test_linear_methods (test.test_trace.TestLineCounts) ... FAIL
test_trace_func_generator (test.test_trace.TestLineCounts) ... FAIL
test_trace_list_comprehension (test.test_trace.TestLineCounts) ... FAIL
test_traced_func_importing (test.test_trace.TestLineCounts) ... FAIL
test_traced_func_linear (test.test_trace.TestLineCounts) ... FAIL
test_traced_func_loop (test.test_trace.TestLineCounts) ... FAIL
test_exec_counts (test.test_trace.TestRunExecCounts) ... ERROR
test_ignored (test.test_trace.Test_Ignore) ... ok

======================================================================
ERROR: test_exec_counts (test.test_trace.TestRunExecCounts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py", line 217, in test_exec_counts
    self.assertEqual(self.tracer.results().counts[k], expected[k])
KeyError: ('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 43)

======================================================================
FAIL: test_loop_caller_importing (test.test_trace.TestCallers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py", line 286, in test_loop_caller_importing
    self.assertEqual(self.tracer.results().callers, expected)
AssertionError: {(('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 'test_tra [truncated]... != {(('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 'test_trace', [truncated]...
Diff is 2446 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_inst_method_calling (test.test_trace.TestFuncs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py", line 259, in test_inst_method_calling
    self.assertEqual(self.tracer.results().calledfuncs, expected)
AssertionError: {('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 'test_trac [truncated]... != {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 'test_trace',  [truncated]...
Diff is 926 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_loop_caller_importing (test.test_trace.TestFuncs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py", line 246, in test_loop_caller_importing
    self.assertEqual(self.tracer.results().calledfuncs, expected)
AssertionError: {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/tracedmodules/testmod.py', 'te [truncated]... != {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 'test_trace',  [truncated]...
Diff is 1310 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_simple_caller (test.test_trace.TestFuncs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py", line 234, in test_simple_caller
    self.assertEqual(self.tracer.results().calledfuncs, expected)
AssertionError: {('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 'test_trac [truncated]... != {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 'test_trace',  [truncated]...
- {('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 'test_trace', 'traced_func_linear'): 1,
?                           --  ^^^^

+ {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 'test_trace', 'traced_func_linear'): 1,
?                             ^^

-  ('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 'test_trace', 'traced_func_simple_caller'): 1}
?                           --  ^^^^

+  ('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 'test_trace', 'traced_func_simple_caller'): 1}
?                             ^^


======================================================================
FAIL: test_linear_methods (test.test_trace.TestLineCounts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py", line 190, in test_linear_methods
    self.assertEqual(tracer.results().counts, expected)
AssertionError: {('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 84): 1} != {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 84): 1}
- {('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 84): 1}
?                           --  ^^^^

+ {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 84): 1}
?                             ^^


======================================================================
FAIL: test_trace_func_generator (test.test_trace.TestLineCounts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py", line 158, in test_trace_func_generator
    self.assertEqual(self.tracer.results().counts, expected)
AssertionError: {('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 67): 11, ( [truncated]... != {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 67): 11, ('/Us [truncated]...
Diff is 1376 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_trace_list_comprehension (test.test_trace.TestLineCounts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py", line 173, in test_trace_list_comprehension
    self.assertEqual(self.tracer.results().counts, expected)
AssertionError: {('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 71): 10, ( [truncated]... != {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 75): 12, ('/Us [truncated]...
Diff is 916 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_traced_func_importing (test.test_trace.TestLineCounts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py", line 143, in test_traced_func_importing
    self.assertEqual(self.tracer.results().counts, expected)
AssertionError: {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/tracedmodules/testmod.py', 3): [truncated]... != {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/tracedmodules/testmod.py', 3): [truncated]...
- {('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 49): 1,
?                           --  ^^^^

+ {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 49): 1,
?                             ^^

   ('/Users/steffen/usr/opt/py3k/lib/python3.3/test/tracedmodules/testmod.py', 2): 1,
   ('/Users/steffen/usr/opt/py3k/lib/python3.3/test/tracedmodules/testmod.py', 3): 1}

======================================================================
FAIL: test_traced_func_linear (test.test_trace.TestLineCounts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py", line 119, in test_traced_func_linear
    self.assertEqual(self.tracer.results().counts, expected)
AssertionError: {('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 39): 1, (' [truncated]... != {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 39): 1, ('/Use [truncated]...
Diff is 912 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_traced_func_loop (test.test_trace.TestLineCounts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py", line 131, in test_traced_func_loop
    self.assertEqual(self.tracer.results().counts, expected)
AssertionError: {('/Users/steffen/usr/opt/.cpython/lib/python3.3/test/test_trace.py', 45): 5, (' [truncated]... != {('/Users/steffen/usr/opt/py3k/lib/python3.3/test/test_trace.py', 43): 1, ('/Use [truncated]...
Diff is 912 characters long. Set self.maxDiff to None to see it.

----------------------------------------------------------------------
Ran 15 tests in 5.113s

FAILED (failures=10, errors=1)
test test_trace failed -- multiple errors occurred


13:21 ~/usr/opt $ python3 -E -Wd -m test -r -w test_trace
Using random seed 8435571
[1/1] test_trace
1 test OK.
msg221735 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-27 21:05
Can this be closed as "out of date"?
History
Date User Action Args
2014-06-27 21:37:39ned.deilysetstatus: open -> closed
resolution: wont fix
stage: resolved
2014-06-27 21:05:57BreamoreBoysetnosy: + BreamoreBoy
messages: + msg221735
2011-03-16 13:42:59sdaodensetnosy: - sdaoden
2011-03-16 13:42:21sdaodensetnosy: + ezio.melotti

messages: + msg131112
title: test_inspect, test_trace not symlink install clean -> test_trace not symlink install clean
2011-03-14 13:09:49sdaodensetstatus: closed -> open

messages: + msg130809
resolution: not a bug -> (no value)
title: Test suite not symlink-install clean -> test_inspect, test_trace not symlink install clean
2011-03-10 11:01:23sdaodensetstatus: open -> closed

messages: + msg130499
resolution: not a bug
2011-03-09 19:59:03sdaodensetmessages: + msg130460
2011-03-09 12:26:55sdaodencreate