[issue12394] packaging: generate scripts from callable (dotted paths)

Éric Araujo report at bugs.python.org
Tue Jul 26 14:38:02 CEST 2011


Éric Araujo <merwok at netwok.org> added the comment:

Your tests contain this:

+        sys.path.append(source)

When using regrtest (see http://docs.python.org/devguide/runtests#running), you’ll get a warning that test_packaging altered sys.path.  Your code should make sure sys.path is restored to its previous test:

+        self.addCleanup(sys.path.remove, source)
         sys.path.append(source)

See the unittest.TestCase doc for more about addCleanup and tearDown.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12394>
_______________________________________


More information about the Python-bugs-list mailing list