Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test failures on tip #337

Closed
nedbat opened this issue Nov 13, 2014 · 9 comments
Closed

test failures on tip #337

nedbat opened this issue Nov 13, 2014 · 9 comments
Labels
bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented Nov 13, 2014

Originally reported by Buck Evan (Bitbucket: bukzor, GitHub: bukzor)


I really don't know what these mean, but I'm fairly sure they're not my fault.
I'm on revision f9d87b7d36ed (bb).

$ tox -e py27
py27 develop-inst-noop: /home/buck/trees/mine/coverage.py
py27 runtests: PYTHONHASHSEED='3977155175'
py27 runtests: commands[0] | /home/buck/trees/mine/coverage.py/.tox/py27/bin/python setup.py --quiet clean develop
py27 runtests: commands[1] | /home/buck/trees/mine/coverage.py/.tox/py27/bin/python igor.py zip_mods install_egg remove_extension
py27 runtests: commands[2] | /home/buck/trees/mine/coverage.py/.tox/py27/bin/python igor.py test_with_tracer py
...................................................................................................................................................................................................................................................................................................................................................................E.......FF.F...............................................................................
======================================================================
ERROR: test_subprocess_with_pth_files (tests.test_process.ProcessStartupTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buck/trees/mine/coverage.py/tests/test_process.py", line 673, in test_subprocess_with_pth_files
    self.assertEqual(data.summary()['sub.py'], 2)
KeyError: 'sub.py'

======================================================================
FAIL: test_coverage_run_dashm_is_like_python_dashm (tests.test_process.ProcessTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buck/trees/mine/coverage.py/tests/test_process.py", line 332, in test_coverage_run_dashm_is_like_python_dashm
    self.assertMultiLineEqual(out_cov, out_py)
AssertionError: '{\'DATA\': \'xyzzy\',\n \'FN_VAL\': "my_fn(\'fooey\')",\n \'__builtins__.dir\': [truncated]... != '{\'DATA\': \'xyzzy\',\n \'FN_VAL\': "my_fn(\'fooey\')",\n \'__builtins__.dir\': [truncated]...
  {'DATA': 'xyzzy',
   'FN_VAL': "my_fn('fooey')",
   '__builtins__.dir': <snip>,
   '__builtins__.has_open': True,
   '__doc__': 'Test file for run_python_file.',
   '__file__': '/home/buck/trees/mine/coverage.py/tests/try_execfile.py',
   '__main__.DATA': 'xyzzy',
   '__name__': '__main__',
   '__package__': 'tests',
   'argv': ['/home/buck/trees/mine/coverage.py/tests/try_execfile.py'],
   'path': ['',
            '/home/buck/trees/mine/coverage.py',
            '/home/buck/trees/mine/coverage.py/.tox/py27/local/lib/python2.7/site-packages/covtestegg1-0.0.0-py2.7.egg',
+           '/home/buck/trees/mine/coverage.py/.tox/py27/lib/python2.7/site-packages/covtestegg1-0.0.0-py2.7.egg',
            '/home/buck/trees/mine/coverage.py/tests/modules',
            '/home/buck/trees/mine/coverage.py/tests/zipmods.zip',
            '/home/buck/trees/mine/coverage.py/.tox/py27/lib/python2.7',
            '/home/buck/trees/mine/coverage.py/.tox/py27/lib/python2.7/plat-x86_64-linux-gnu',
            '/home/buck/trees/mine/coverage.py/.tox/py27/lib/python2.7/lib-tk',
            '/home/buck/trees/mine/coverage.py/.tox/py27/lib/python2.7/lib-old',
            '/home/buck/trees/mine/coverage.py/.tox/py27/lib/python2.7/lib-dynload',
            '/usr/lib/python2.7',
            '/usr/lib/python2.7/plat-x86_64-linux-gnu',
            '/usr/lib/python2.7/lib-tk',
-           '/home/buck/trees/mine/coverage.py/.tox/py27/local/lib/python2.7/site-packages']}
?                                                                                          ^^
+           '/home/buck/trees/mine/coverage.py/.tox/py27/local/lib/python2.7/site-packages',
?                                                                                          ^
+           '/home/buck/trees/mine/coverage.py/.tox/py27/lib/python2.7/site-packages']}
<snip>

----------------------------------------------------------------------
Ran 446 tests in 13.858s

FAILED (errors=1, failures=3)
=== CPython 2.7.6 with C tracer (.tox/py27/bin/python) ===
ERROR: InvocationError: '/home/buck/trees/mine/coverage.py/.tox/py27/bin/python igor.py test_with_tracer c'
___________________________________ summary ____________________________________
ERROR:   py27: commands failed

@nedbat
Copy link
Owner Author

nedbat commented Nov 14, 2014

Since I don't hear people complaining about the difference between "coverage run foo.py" and "python foo.py", I think we should change try_execfile.py to be resilient to these differences. If the extra/missing sys.path entries are actually just duplicate (symlinked) paths, then we can have our own function that reduces sys.path to the unique entries, keeping the order, and then compare those.

@nedbat
Copy link
Owner Author

nedbat commented Nov 14, 2014

Fixed in changeset 4f5a5a0b3466 (bb). Please let me know if there are still problems.

@nedbat
Copy link
Owner Author

nedbat commented Nov 14, 2014

And the fix is tweaked in 17f7fcc85836 (bb)

@nedbat
Copy link
Owner Author

nedbat commented Nov 14, 2014

Original comment by Buck Evan (Bitbucket: bukzor, GitHub: bukzor)


The three similar failures are now fixed, but I still get the KeyError: sub.py failure.

Please to reopen.

@nedbat
Copy link
Owner Author

nedbat commented Nov 14, 2014

I can confirm that these two commands repro the problem.

@nedbat
Copy link
Owner Author

nedbat commented Nov 14, 2014

(Would have been good to make a separate issue for the separate failures, but there's context here, so whatever :)

@nedbat
Copy link
Owner Author

nedbat commented Nov 15, 2014

If you're going to put work into this ticket, make a new one. Now there's a changeset referencing this ticket, and the thing it fixes bears no relation to the title of the ticket. :(

@nedbat
Copy link
Owner Author

nedbat commented Nov 16, 2014

Original comment by Buck Evan (Bitbucket: bukzor, GitHub: bukzor)


Changed title back, made fresh ticket at #340.
This one can be closed.
I think that's how you wanted it.

@nedbat
Copy link
Owner Author

nedbat commented Nov 16, 2014

back to fixed.

@nedbat nedbat closed this as completed Nov 16, 2014
@nedbat nedbat added major bug Something isn't working labels Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant