Jason Pellerin avatar Jason Pellerin committed 39ec62f

Fixed issue #63. Bumped version to 0.10.0a2 in preparation for release.

Comments (0)

Files changed (4)

 - Fixed loading of plugins from that entry point.
 - Fixed backwards-compatibility issue in nose.util (is_generator was
   renamed isgenerator). (Issue #64)
+- Fixed bug in --logging-config option. Thanks to anton_kr... at yahoo
+  com for the bug report. (Issue #62)
+- Fixed bug in handling of --where argument: first --where was not
+  passed to loader as workingDir. Thanks to nosexunit for the bug
+  report. (Issue #63).
 from nose.tools import with_setup 
 __author__ = 'Jason Pellerin'
-__versioninfo__ = (0, 10, '0a1')
+__versioninfo__ = (0, 10, '0a2')
 __version__ = '.'.join(map(str, __versioninfo__))
 __all__ = [
         self.testNames = ()
         self.verbosity = int(env.get('NOSE_VERBOSE', 1))
         self.where = ()
-        self.workingDir = None
+        self.workingDir = os.getcwd()
         self._default = self.__dict__.copy()
         self._orig = self.__dict__.copy()
-        #        self._where = None
-        #        self._working_dir = None
     def __repr__(self):
         d = self.__dict__.copy()
         self.loggingConfig = options.loggingConfig
+        if options.where is not None:
+            self.configureWhere(options.where)
         if options.testMatch:
             self.testMatch = re.compile(options.testMatch)
-        if options.where is not None:
-            self.configureWhere(options.where)
         if options.include:
             self.include = map(re.compile, tolist(options.include))
             log.info("Including tests matching %s", options.include)
         it already has a handler.
         if self.loggingConfig:
-            logging.fileConfig(self.loggingConfig)
+            from logging.config import fileConfig
+            fileConfig(self.loggingConfig)
         format = logging.Formatter('%(name)s: %(levelname)s: %(message)s')
     def configureWhere(self, where):
-        """Configure the working director for the test run.
+        """Configure the working directory or directories for the test run.
         from nose.importer import add_path
+        self.workingDir = None
         where = tolist(where)
         warned = False
         for path in where:
         if importer is None:
             importer = Importer(config=config)
         if workingDir is None:
-            workingDir = os.getcwd()
+            workingDir = config.workingDir            
         if selector is None:
             selector = defaultSelector(config)
         self.config = config
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.