[Zope3-checkins] SVN: zope.testing/trunk/src/zope/testing/testrunner.py Remove useless dot ('.') at the end of the package. bash

Julien Anguenot ja at nuxeo.com
Thu Jan 12 23:13:47 EST 2006


Log message for revision 41294:
  Remove useless dot ('.') at the end of the package. bash
  adds a `/` by default using completion. Otherweise, it
  raises an exception trying to import an empty package
  because of this.
  

Changed:
  U   zope.testing/trunk/src/zope/testing/testrunner.py

-=-
Modified: zope.testing/trunk/src/zope/testing/testrunner.py
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner.py	2006-01-13 03:13:22 UTC (rev 41293)
+++ zope.testing/trunk/src/zope/testing/testrunner.py	2006-01-13 04:13:46 UTC (rev 41294)
@@ -1684,6 +1684,11 @@
     if options.package:
         options.package = [p.replace('/', '.').replace('\\', '.')
                            for p in options.package]
+        # Remove useless dot ('.') at the end of the package. bash
+        # adds a `/` by default using completion. Otherweise, it
+        # raises an exception trying to import an empty package
+        # because of this.
+        options.package = [re.sub(r'\.$', '',  p) for p in options.package]
     options.path = map(os.path.abspath, options.path or ())
     options.test_path = map(os.path.abspath, options.test_path or ())
     options.test_path += options.path



More information about the Zope3-Checkins mailing list