[issue19352] unittest loader barfs on symlinks

2021-08-14 Thread Irit Katriel
Irit Katriel added the comment: > this affects python 2.7 only; -- nosy: +iritkatriel resolution: -> out of date status: open -> closed ___ Python tracker ___

[issue19352] unittest loader barfs on symlinks

2014-02-06 Thread Kevin M. Turner
Changes by Kevin M. Turner acapno...@users.sourceforge.net: -- nosy: +acapnotic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19352 ___ ___

[issue19352] unittest loader barfs on symlinks

2013-11-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: ImportError: 'test_error' module incorrectly imported from '/usr/lib/python2.7/dist-packages/lazr/restfulclient/tests'. Expected '/usr/lib/python2.7/dist-packages/lazr/restfulclient/tests'. Is this module globally installed? Well, this looks like the

[issue19352] unittest loader barfs on symlinks

2013-11-29 Thread Martin Pitt
Martin Pitt added the comment: In this new code: mod_file = os.path.abspath(getattr(module, '__file__', full_path)) realpath = os.path.splitext(os.path.realpath(mod_file))[0] fullpath_noext =

[issue19352] unittest loader barfs on symlinks

2013-11-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: On ven., 2013-11-29 at 16:23 +, Martin Pitt wrote: This new patch essentially enforces that the *.py file is not a symlink, which breaks the Debian-ish way of installing python 2 modules. So it doesn't help that Debian/Ubuntu likes to put symlinks

[issue19352] unittest loader barfs on symlinks

2013-11-29 Thread Martin Pitt
Martin Pitt added the comment: Yes, this affects python 2.7 only; as I said, this is all solved in python3 by introducing the explicit extensions like __pycache__/*..cpython-33.pyc so that multiple versions can share one directory. With that these symlink hacks aren't necessary any more.

[issue19352] unittest loader barfs on symlinks

2013-11-28 Thread Matthias Klose
Matthias Klose added the comment: re-opening. the patch did break autopilot running with 2.7 on Ubuntu. I don't yet understand what this patch is supposed to fix. -- nosy: +doko resolution: fixed - status: closed - open ___ Python tracker

[issue19352] unittest loader barfs on symlinks

2013-11-28 Thread Matthias Klose
Matthias Klose added the comment: see https://launchpad.net/bugs/1255505 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19352 ___ ___

[issue19352] unittest loader barfs on symlinks

2013-11-28 Thread Martin Pitt
Martin Pitt added the comment: More precisely, it broke unittest's discovery (not specific to autopilot). For any installed test, you now get: $ python -m unittest discover lazr Traceback (most recent call last): File /usr/lib/python2.7/runpy.py, line 162, in _run_module_as_main

[issue19352] unittest loader barfs on symlinks

2013-10-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset d7ec961cea1c by Antoine Pitrou in branch '2.7': Issue #19352: Fix unittest discovery when a module can be reached through several paths (e.g. under Debian/Ubuntu with virtualenv). http://hg.python.org/cpython/rev/d7ec961cea1c -- nosy:

[issue19352] unittest loader barfs on symlinks

2013-10-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset a830cc1c0565 by Antoine Pitrou in branch '3.3': Issue #19352: Fix unittest discovery when a module can be reached through several paths (e.g. under Debian/Ubuntu with virtualenv). http://hg.python.org/cpython/rev/a830cc1c0565 New changeset

[issue19352] unittest loader barfs on symlinks

2013-10-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed! -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19352 ___

[issue19352] unittest loader barfs on symlinks

2013-10-22 Thread Antoine Pitrou
New submission from Antoine Pitrou: unittest.loader has the following snippet: if realpath.lower() != fullpath_noext.lower(): module_dir = os.path.dirname(realpath) mod_name = os.path.splitext(os.path.basename(full_path))[0]

[issue19352] unittest loader barfs on symlinks

2013-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Attaching patch. -- keywords: +patch Added file: http://bugs.python.org/file32304/unittest_loader_symlinks.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19352

[issue19352] unittest loader barfs on symlinks

2013-10-22 Thread Michael Foord
Michael Foord added the comment: Good catch and fix Antoine. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19352 ___ ___