Hello community, here is the log from the commit of package python-nose for openSUSE:Factory checked in at 2015-04-22 01:14:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-nose (Old) and /work/SRC/openSUSE:Factory/.python-nose.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-nose" Changes: -------- --- /work/SRC/openSUSE:Factory/python-nose/python-nose-doc.changes 2014-05-11 14:16:18.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-nose.new/python-nose-doc.changes 2015-04-22 01:14:49.000000000 +0200 @@ -1,0 +2,25 @@ +Wed Apr 15 19:06:01 UTC 2015 - h...@urpla.net + +- update to 1.3.6: + - Re-release of 1.3.5 with wheels fixed. +- update to 1.3.5 + - Fix #875: nose doesn't collect tests when subpackage is given as arg + - Fix #809: tests not discovered for namespace packages on Windows + - Fix #815: "ValueError: unsupported pickle protocol" with --with-id + - Wrap the working dir path name in quotes when reporting an error. + Patch by Őry Máté. + - Fix #887: Fix a discrepancy in test names between Python 2 and Python 3 + - Fix #131: Use os.stat() to check if file is executable + Patch by Arnon Yaari. + - Fix #820 and #719: Fix coverage plugin with multiprocess + Patch by Nicolas Grasset. +- update to 1.3.4 + - Recognize doctest options defined in other plugins + Patch by Daniel Lepage + - Another fix for Python 3.4: Call super in LazySuite to access + _removed_tests variable + Patch by Robert Kuska + - Fix for try_run when using bound methods + Patch by Christian Lyder Jacobsen + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/python-nose/python-nose.changes 2014-05-11 14:16:18.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-nose.new/python-nose.changes 2015-04-22 01:14:49.000000000 +0200 @@ -1,0 +2,19 @@ +Wed Apr 15 19:06:01 UTC 2015 - h...@urpla.net + +- Update to version 1.3.6: + * Re-release of 1.3.5 with wheels fixed. +- Changes from version 1.3.5 + * Fix #875: nose doesn't collect tests when subpackage is given as arg + * Fix #809: tests not discovered for namespace packages on Windows + * Fix #815: "ValueError: unsupported pickle protocol" with --with-id + * Wrap the working dir path name in quotes when reporting an error. + * Fix #887: Fix a discrepancy in test names between Python 2 and Python 3 + * Fix #131: Use os.stat() to check if file is executable + * Fix #820 and #719: Fix coverage plugin with multiprocess +- Changes from version 1.3.4 + * Recognize doctest options defined in other plugins + * Another fix for Python 3.4: Call super in LazySuite to access + _removed_tests variable + * Fix for try_run when using bound methods + +------------------------------------------------------------------- Old: ---- nose-1.3.3.tar.gz New: ---- nose-1.3.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-nose-doc.spec ++++++ --- /var/tmp/diff_new_pack.ukbVcn/_old 2015-04-22 01:14:50.000000000 +0200 +++ /var/tmp/diff_new_pack.ukbVcn/_new 2015-04-22 01:14:50.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-nose-doc # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python-nose-doc -Version: 1.3.3 +Version: 1.3.6 Release: 0 Url: http://readthedocs.org/docs/nose/ Summary: Nose extends unittest to make testing easier python-nose.spec: same change ++++++ nose-1.3.3.tar.gz -> nose-1.3.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/CHANGELOG new/nose-1.3.6/CHANGELOG --- old/nose-1.3.3/CHANGELOG 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/CHANGELOG 2015-04-04 13:45:24.000000000 +0200 @@ -1,3 +1,34 @@ +1.3.6 + +- Re-release of 1.3.5 with wheels fixed. + +1.3.5 + +- Fix #875: nose doesn't collect tests when subpackage is given as arg +- Fix #809: tests not discovered for namespace packages on Windows +- Fix #815: "ValueError: unsupported pickle protocol" with --with-id +- Wrap the working dir path name in quotes when reporting an error. + Patch by Őry Máté. +- Fix #887: Fix a discrepancy in test names between Python 2 and Python 3 +- Fix #131: Use os.stat() to check if file is executable + Patch by Arnon Yaari. +- Fix #820 and #719: Fix coverage plugin with multiprocess + Patch by Nicolas Grasset. + +1.3.4 + +- Recognize doctest options defined in other plugins + Patch by Daniel Lepage +- Another fix for Python 3.4: Call super in LazySuite to access + _removed_tests variable + Patch by Robert Kuska +- Fix for try_run when using bound methods + Patch by Christian Lyder Jacobsen + +1.3.3 + +- Fixed a minor issue with the reported version number. + 1.3.2 - Fixed an issue where build_ext was not working under setup.py nosetest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/NEWS new/nose-1.3.6/NEWS --- old/nose-1.3.3/NEWS 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/NEWS 2015-04-04 12:19:15.000000000 +0200 @@ -1,7 +1,9 @@ -1.3.3 +1.3.5 ----- -1.3.3 fixes a simple issue with the reported version number. +1.3.5 fixes several minor issues, including the gathering of tests when using +package notation, using the coverage plugin with multiprocessing, and several +others. See the CHANGELOG for more details. Also note that nose 1.x is in maintenance mode. We will not be looking to add any features, and you should seriously consider @@ -9,10 +11,4 @@ If you're interested in the future of nose, please take a look at the nose2 project on github (https://github.com/nose-devs/nose2) or pypi -(http://pypi.python.org/pypi/nose2/0.4.7). - -And lastly if you have the money to spare, please consider donating to -the John Hunter memorial fund (http://numfocus.org/johnhunter/). We -all give up time with our families to work on free software: so now -the free software community that has benefited so much from that -time we took can give something back to his family. +(http://pypi.python.org/pypi/nose2/0.5.0). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/PKG-INFO new/nose-1.3.6/PKG-INFO --- old/nose-1.3.3/PKG-INFO 2014-05-06 11:54:08.000000000 +0200 +++ new/nose-1.3.6/PKG-INFO 2015-04-04 13:45:28.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: nose -Version: 1.3.3 +Version: 1.3.6 Summary: nose extends unittest to make testing easier Home-page: http://readthedocs.org/docs/nose/ Author: Jason Pellerin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/README.txt new/nose-1.3.6/README.txt --- old/nose-1.3.3/README.txt 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/README.txt 2015-04-04 13:45:24.000000000 +0200 @@ -309,7 +309,7 @@ --nologcapture - Disable logging capture plugin. Logging configurtion will be left + Disable logging capture plugin. Logging configuration will be left intact. [NOSE_NOLOGCAPTURE] --logging-format=FORMAT @@ -519,6 +519,11 @@ Path to xml file to store the xunit report in. Default is nosetests.xml in the working directory [NOSE_XUNIT_FILE] +--xunit-testsuite-name=PACKAGE + + Name of the testsuite in the xunit xml, generated by plugin. + Default test suite name is nosetests. + --all-modules Enable plugin AllModules: Collect tests from all python modules. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/functional_tests/support/issue859/test.py new/nose-1.3.6/functional_tests/support/issue859/test.py --- old/nose-1.3.3/functional_tests/support/issue859/test.py 1970-01-01 01:00:00.000000000 +0100 +++ new/nose-1.3.6/functional_tests/support/issue859/test.py 2015-04-04 11:56:47.000000000 +0200 @@ -0,0 +1,6 @@ +from unittest import TestCase + + +class TestBase(TestCase): + def test_a(self): + assert 1 == 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/functional_tests/support/package2/test_pak/__init__.py new/nose-1.3.6/functional_tests/support/package2/test_pak/__init__.py --- old/nose-1.3.3/functional_tests/support/package2/test_pak/__init__.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/functional_tests/support/package2/test_pak/__init__.py 2015-04-04 11:56:47.000000000 +0200 @@ -5,7 +5,6 @@ # print "SETUP CALLED", state, id(state) state.append('test_pak.setup') - def teardown(): # print "TEARDOWN CALLED", state, id(state) state.append('test_pak.teardown') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/functional_tests/support/package2/test_pak/test_sub/__init__.py new/nose-1.3.6/functional_tests/support/package2/test_pak/test_sub/__init__.py --- old/nose-1.3.3/functional_tests/support/package2/test_pak/test_sub/__init__.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/functional_tests/support/package2/test_pak/test_sub/__init__.py 2015-04-04 11:56:47.000000000 +0200 @@ -7,3 +7,6 @@ def teardown(): # print "SUB teardown called", state, id(state) state.append('test_pak.test_sub.teardown') + +def test_sub_init(): + state.append('test_pak.test_sub.test_sub_init') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/functional_tests/test_coverage_plugin.py new/nose-1.3.6/functional_tests/test_coverage_plugin.py --- old/nose-1.3.3/functional_tests/test_coverage_plugin.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/functional_tests/test_coverage_plugin.py 2015-04-04 11:56:47.000000000 +0200 @@ -40,7 +40,12 @@ super(TestCoveragePlugin, self).setUp() def runTest(self): - self.assertTrue("blah 4 3 25% 1" in self.output) + print(self.output) + self.assertTrue( + # Coverage < 4.0 + ("blah 4 3 25% 1" in self.output) or + # Coverage >= 4.0 + ("blah.py 4 3 25% 1, 5-6" in self.output)) self.assertTrue("Ran 1 test in" in self.output) # Assert coverage html report exists self.assertTrue(os.path.exists(os.path.join(self.cover_html_dir, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/functional_tests/test_loader.py new/nose-1.3.6/functional_tests/test_loader.py --- old/nose-1.3.3/functional_tests/test_loader.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/functional_tests/test_loader.py 2015-04-04 11:56:47.000000000 +0200 @@ -75,7 +75,7 @@ assert not res.errors, res.errors assert not res.failures, res.failures - self.assertEqual(res.testsRun, 5) + self.assertEqual(res.testsRun, 6) # Expected order of calls expect = ['test_pak.setup', @@ -84,6 +84,7 @@ 'test_pak.test_mod.test_minus', 'test_pak.test_mod.teardown', 'test_pak.test_sub.setup', + 'test_pak.test_sub.test_sub_init', 'test_pak.test_sub.test_mod.setup', 'test_pak.test_sub.test_mod.TestMaths.setup_class', 'test_pak.test_sub.test_mod.TestMaths.setup', @@ -414,8 +415,60 @@ print res.errors self.assertEqual(len(res.errors), 1) assert 'raise Exception("pow")' in res.errors[0][1] - - + + def test_load_from_file(self): + res = unittest.TestResult() + wd = os.path.join(support, 'package2') + l = loader.TestLoader(workingDir=wd) + suite = l.loadTestsFromName('test_pak/test_sub/__init__.py') + suite(res) + + assert 'test_pak' in sys.modules, \ + "Context did not load test_pak" + m = sys.modules['test_pak'] + print "test pak state", m.state + expect = ['test_pak.setup', + 'test_pak.test_sub.setup', + 'test_pak.test_sub.test_sub_init', + 'test_pak.test_sub.teardown', + 'test_pak.teardown'] + self.assertEqual(len(m.state), len(expect)) + for item in m.state: + self.assertEqual(item, expect.pop(0)) + + + def test_load_from_sub_package(self): + res = unittest.TestResult() + wd = os.path.join(support, 'package2') + l = loader.TestLoader(workingDir=wd) + suite = l.loadTestsFromName('test_pak.test_sub') + suite(res) + + assert 'test_pak' in sys.modules, \ + "Context did not load test_pak" + m = sys.modules['test_pak'] + print "test pak state", m.state + expect = ['test_pak.setup', + 'test_pak.test_sub.setup', + 'test_pak.test_sub.test_sub_init', + 'test_pak.test_sub.test_mod.setup', + 'test_pak.test_sub.test_mod.TestMaths.setup_class', + 'test_pak.test_sub.test_mod.TestMaths.setup', + 'test_pak.test_sub.test_mod.TestMaths.test_div', + 'test_pak.test_sub.test_mod.TestMaths.teardown', + 'test_pak.test_sub.test_mod.TestMaths.setup', + 'test_pak.test_sub.test_mod.TestMaths.test_two_two', + 'test_pak.test_sub.test_mod.TestMaths.teardown', + 'test_pak.test_sub.test_mod.TestMaths.teardown_class', + 'test_pak.test_sub.test_mod.test', + 'test_pak.test_sub.test_mod.teardown', + 'test_pak.test_sub.teardown', + 'test_pak.teardown'] + self.assertEqual(len(m.state), len(expect)) + for item in m.state: + self.assertEqual(item, expect.pop(0)) + + # used for comparing lists def diff(a, b): return '\n' + '\n'.join([ l for l in ndiff(a, b) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/functional_tests/test_program.py new/nose-1.3.6/functional_tests/test_program.py --- old/nose-1.3.3/functional_tests/test_program.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/functional_tests/test_program.py 2015-04-04 11:56:47.000000000 +0200 @@ -56,8 +56,8 @@ exit=False) res = runner.result print stream.getvalue() - self.assertEqual(res.testsRun, 5, - "Expected to run 5 tests, ran %s" % res.testsRun) + self.assertEqual(res.testsRun, 6, + "Expected to run 6 tests, ran %s" % res.testsRun) assert res.wasSuccessful() assert not res.errors assert not res.failures @@ -165,7 +165,7 @@ exit=False) res = runner.result print stream.getvalue() - self.assertEqual(res.testsRun, 7) + self.assertEqual(res.testsRun, 8) def test_illegal_packages_not_selected(self): stream = StringIO() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/functional_tests/test_xunit.py new/nose-1.3.6/functional_tests/test_xunit.py --- old/nose-1.3.3/functional_tests/test_xunit.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/functional_tests/test_xunit.py 2015-04-04 11:56:47.000000000 +0200 @@ -108,3 +108,20 @@ assert 'tests="1" errors="0" failures="0" skip="0"' in result assert 'line1\n' in result assert 'line2\n' in result + + +class TestIssue859(PluginTester, unittest.TestCase): + activate = '--with-xunit' + testsuite_name = "TestIssue859" + args = ['-v', '--xunit-file=%s' % xml_results_filename, '--xunit-testsuite-name=%s' % testsuite_name] + plugins = [Xunit(), Skip()] + suitepath = os.path.join(support, 'issue859') + + def runTest(self): + print str(self.output) + f = open(xml_results_filename, 'r') + result = f.read() + f.close() + print result + assert 'tests="1" errors="0" failures="0" skip="0"' in result + assert 'testsuite name="TestIssue859"' in result diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/__init__.py new/nose-1.3.6/nose/__init__.py --- old/nose-1.3.3/nose/__init__.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/__init__.py 2015-04-04 13:45:24.000000000 +0200 @@ -4,7 +4,7 @@ from nose.tools import with_setup __author__ = 'Jason Pellerin' -__versioninfo__ = (1, 3, 3) +__versioninfo__ = (1, 3, 6) __version__ = '.'.join(map(str, __versioninfo__)) __all__ = [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/config.py new/nose-1.3.6/nose/config.py --- old/nose-1.3.3/nose/config.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/config.py 2015-04-04 11:56:47.000000000 +0200 @@ -416,7 +416,7 @@ if not self.workingDir: abs_path = absdir(path) if abs_path is None: - raise ValueError("Working directory %s not found, or " + raise ValueError("Working directory '%s' not found, or " "not a directory" % path) log.info("Set working dir to %s", abs_path) self.workingDir = abs_path diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/loader.py new/nose-1.3.6/nose/loader.py --- old/nose-1.3.3/nose/loader.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/loader.py 2015-04-04 11:56:47.000000000 +0200 @@ -55,7 +55,7 @@ workingDir = None selector = None suiteClass = None - + def __init__(self, config=None, importer=None, workingDir=None, selector=None): """Initialize a test loader. @@ -64,7 +64,7 @@ * config: provide a `nose.config.Config`_ or other config class instance; if not provided a `nose.config.Config`_ with - default values is used. + default values is used. * importer: provide an importer instance that implements `importFromPath`. If not provided, a `nose.importer.Importer`_ is used. @@ -91,7 +91,7 @@ self.workingDir = op_normpath(op_abspath(workingDir)) self.selector = selector if config.addPaths: - add_path(workingDir, config) + add_path(workingDir, config) self.suiteClass = ContextSuiteFactory(config=config) self._visitedPaths = set([]) @@ -139,7 +139,7 @@ -- each suite of tests from a module or other file is yielded and is expected to be executed before the next file is examined. - """ + """ log.debug("load from dir %s", path) plugins = self.config.plugins plugins.beforeDirectory(path) @@ -204,7 +204,7 @@ raise except: yield self.suiteClass([Failure(*sys.exc_info())]) - + # pop paths if self.config.addPaths: for p in paths_added: @@ -336,9 +336,15 @@ # FIXME can or should this be lazy? # is this syntax 2.2 compatible? module_paths = getattr(module, '__path__', []) + if path: - path = os.path.realpath(path) + path = os.path.normcase(os.path.realpath(path)) + for module_path in module_paths: + log.debug('os.path.normcase(%r): %r', module_path, + os.path.normcase(module_path)) + module_path = os.path.normcase(module_path) + log.debug("Load tests from module path %s?", module_path) log.debug("path: %s os.path.realpath(%s): %s", path, module_path, os.path.realpath(module_path)) @@ -348,12 +354,12 @@ # directory before trying to load from it. if os.path.isdir(module_path): tests.extend(self.loadTestsFromDir(module_path)) - + for test in self.config.plugins.loadTestsFromModule(module, path): tests.append(test) return self.suiteClass(ContextList(tests, context=module)) - + def loadTestsFromName(self, name, module=None, discovered=False): """Load tests from the entity with the given name. @@ -363,14 +369,14 @@ """ # FIXME refactor this method into little bites? log.debug("load from %s (%s)", name, module) - + suite = self.suiteClass # give plugins first crack plug_tests = self.config.plugins.loadTestsFromName(name, module) if plug_tests: return suite(plug_tests) - + addr = TestAddress(name, workingDir=self.workingDir) if module: # Two cases: @@ -492,7 +498,7 @@ [case for case in super(TestLoader, self).loadTestsFromTestCase(testCaseClass)]) return self.suiteClass(cases) - + def loadTestsFromTestClass(self, cls): """Load tests from a test class that is *not* a unittest.TestCase subclass. @@ -528,7 +534,7 @@ except: addr = None return Failure(exc[0], exc[1], exc[2], address=addr) - + def _makeTest(self, obj, parent=None): """Given a test object and its parent, return a test case or test suite. @@ -551,7 +557,7 @@ except: exc = sys.exc_info() return Failure(exc[0], exc[1], exc[2], address=addr) - + if isfunction(obj) and parent and not isinstance(parent, types.ModuleType): # This is a Python 3.x 'unbound method'. Wrap it with its # associated class.. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/plugins/cover.py new/nose-1.3.6/nose/plugins/cover.py --- old/nose-1.3.3/nose/plugins/cover.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/plugins/cover.py 2015-04-04 11:56:47.000000000 +0200 @@ -99,8 +99,6 @@ except KeyError: pass super(Coverage, self).configure(options, conf) - if conf.worker: - return if self.enabled: try: import coverage @@ -140,22 +138,42 @@ if self.enabled: self.status['active'] = True self.coverInstance = coverage.coverage(auto_data=False, - branch=self.coverBranches, data_suffix=None, + branch=self.coverBranches, data_suffix=conf.worker, source=self.coverPackages) + self.coverInstance._warn_no_data = False + self.coverInstance.is_worker = conf.worker + self.coverInstance.exclude('#pragma[: ]+[nN][oO] [cC][oO][vV][eE][rR]') - def begin(self): + log.debug("Coverage begin") + self.skipModules = sys.modules.keys()[:] + if self.coverErase: + log.debug("Clearing previously collected coverage statistics") + self.coverInstance.combine() + self.coverInstance.erase() + + if not self.coverInstance.is_worker: + self.coverInstance.load() + self.coverInstance.start() + + + def beforeTest(self, *args, **kwargs): """ Begin recording coverage information. """ - log.debug("Coverage begin") - self.skipModules = sys.modules.keys()[:] - if self.coverErase: - log.debug("Clearing previously collected coverage statistics") - self.coverInstance.combine() - self.coverInstance.erase() - self.coverInstance.exclude('#pragma[: ]+[nN][oO] [cC][oO][vV][eE][rR]') - self.coverInstance.load() - self.coverInstance.start() + + if self.coverInstance.is_worker: + self.coverInstance.load() + self.coverInstance.start() + + def afterTest(self, *args, **kwargs): + """ + Stop recording coverage information. + """ + + if self.coverInstance.is_worker: + self.coverInstance.stop() + self.coverInstance.save() + def report(self, stream): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/plugins/doctests.py new/nose-1.3.6/nose/plugins/doctests.py --- old/nose-1.3.3/nose/plugins/doctests.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/plugins/doctests.py 2014-08-24 12:32:54.000000000 +0200 @@ -195,18 +195,19 @@ if options.doctestOptions: flags = ",".join(options.doctestOptions).split(',') for flag in flags: - try: - if flag.startswith('+'): - self.optionflags |= getattr(doctest, flag[1:]) - elif flag.startswith('-'): - self.optionflags &= ~getattr(doctest, flag[1:]) - else: - raise ValueError( - "Must specify doctest options with starting " + - "'+' or '-'. Got %s" % (flag,)) - except AttributeError: + if not flag or flag[0] not in '+-': + raise ValueError( + "Must specify doctest options with starting " + + "'+' or '-'. Got %s" % (flag,)) + mode, option_name = flag[0], flag[1:] + option_flag = doctest.OPTIONFLAGS_BY_NAME.get(option_name) + if not option_flag: raise ValueError("Unknown doctest option %s" % - (flag[1:],)) + (option_name,)) + if mode == '+': + self.optionflags |= option_flag + elif mode == '-': + self.optionflags &= ~option_flag def prepareTestLoader(self, loader): """Capture loader's suiteClass. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/plugins/logcapture.py new/nose-1.3.6/nose/plugins/logcapture.py --- old/nose-1.3.3/nose/plugins/logcapture.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/plugins/logcapture.py 2014-08-24 12:32:54.000000000 +0200 @@ -119,7 +119,7 @@ "--nologcapture", action="store_false", default=not env.get(self.env_opt), dest="logcapture", help="Disable logging capture plugin. " - "Logging configurtion will be left intact." + "Logging configuration will be left intact." " [NOSE_NOLOGCAPTURE]") parser.add_option( "--logging-format", action="store", dest="logcapture_format", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/plugins/testid.py new/nose-1.3.6/nose/plugins/testid.py --- old/nose-1.3.3/nose/plugins/testid.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/plugins/testid.py 2015-04-04 11:56:47.000000000 +0200 @@ -16,7 +16,7 @@ % nosetests -v --with-id #1 tests.test_a ... ok #2 tests.test_b ... ok - #2 tests.test_c ... ok + #3 tests.test_c ... ok Then you can re-run individual tests by supplying just an id number:: @@ -85,9 +85,9 @@ .. note :: If you expect to use ``--failed`` regularly, it's a good idea to always run - run using the ``--with-id`` option. This will ensure that an id file is - always created, allowing you to add ``--failed`` to the command line as soon - as you have failing tests. Otherwise, your first run using ``--failed`` will + using the ``--with-id`` option. This will ensure that an id file is always + created, allowing you to add ``--failed`` to the command line as soon as + you have failing tests. Otherwise, your first run using ``--failed`` will (perhaps surprisingly) run *all* tests, because there won't be an id file containing the record of failed tests from your previous run. @@ -198,6 +198,11 @@ self.ids, self.tests, self.failed, self.source_names, self.idfile) fh.close() + except ValueError, e: + # load() may throw a ValueError when reading the ids file, if it + # was generated with a newer version of Python than we are currently + # running. + log.debug('Error loading %s : %s', self.idfile, str(e)) except IOError: log.debug('IO error reading %s', self.idfile) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/plugins/xunit.py new/nose-1.3.6/nose/plugins/xunit.py --- old/nose-1.3.3/nose/plugins/xunit.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/plugins/xunit.py 2015-04-04 11:56:47.000000000 +0200 @@ -19,6 +19,9 @@ If you need to change the name or location of the file, you can set the ``--xunit-file`` option. +If you need to change the name of the test suite, you can set the +``--xunit-testsuite-name`` option. + Here is an abbreviated version of what an XML test report might look like:: <?xml version="1.0" encoding="UTF-8"?> @@ -155,7 +158,7 @@ taken = time() - self._timer else: # test died before it ran (probably error in setup()) - # or success/failure added before test started probably + # or success/failure added before test started probably # due to custom TestResult munging taken = 0.0 return taken @@ -176,6 +179,13 @@ "Default is nosetests.xml in the working directory " "[NOSE_XUNIT_FILE]")) + parser.add_option( + '--xunit-testsuite-name', action='store', + dest='xunit_testsuite_name', metavar="PACKAGE", + default=env.get('NOSE_XUNIT_TESTSUITE_NAME', 'nosetests'), + help=("Name of the testsuite in the xunit xml, generated by plugin. " + "Default test suite name is nosetests.")) + def configure(self, options, config): """Configures the xunit plugin.""" Plugin.configure(self, options, config) @@ -188,6 +198,7 @@ } self.errorlist = [] self.error_report_file_name = os.path.realpath(options.xunit_file) + self.xunit_testsuite_name = options.xunit_testsuite_name def report(self, stream): """Writes an Xunit-formatted XML file @@ -198,11 +209,12 @@ self.error_report_file = codecs.open(self.error_report_file_name, 'w', self.encoding, 'replace') self.stats['encoding'] = self.encoding + self.stats['testsuite_name'] = self.xunit_testsuite_name self.stats['total'] = (self.stats['errors'] + self.stats['failures'] + self.stats['passes'] + self.stats['skipped']) self.error_report_file.write( u'<?xml version="1.0" encoding="%(encoding)s"?>' - u'<testsuite name="nosetests" tests="%(total)d" ' + u'<testsuite name="%(testsuite_name)s" tests="%(total)d" ' u'errors="%(errors)d" failures="%(failures)d" ' u'skip="%(skipped)d">' % self.stats) self.error_report_file.write(u''.join([force_unicode(e, self.encoding) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/pyversion.py new/nose-1.3.6/nose/pyversion.py --- old/nose-1.3.3/nose/pyversion.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/pyversion.py 2015-04-04 11:56:47.000000000 +0200 @@ -91,6 +91,7 @@ self.__self__ = UnboundSelf(cls) if sys.version_info < (3, 0): self.im_class = cls + self.__doc__ = getattr(func, '__doc__', None) def address(self): cls = self.__self__.cls diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/selector.py new/nose-1.3.6/nose/selector.py --- old/nose-1.3.3/nose/selector.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/selector.py 2015-04-04 11:56:47.000000000 +0200 @@ -10,7 +10,7 @@ import os import unittest from nose.config import Config -from nose.util import split_test_name, src, getfilename, getpackage, ispackage +from nose.util import split_test_name, src, getfilename, getpackage, ispackage, is_executable log = logging.getLogger(__name__) @@ -120,7 +120,7 @@ log.debug('%s matches ignoreFiles pattern; skipped', base) return False - if not self.config.includeExe and os.access(file, os.X_OK): + if not self.config.includeExe and is_executable(file): log.info('%s is executable; skipped', file) return False dummy, ext = op_splitext(base) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/suite.py new/nose-1.3.6/nose/suite.py --- old/nose-1.3.3/nose/suite.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/suite.py 2014-08-24 12:32:54.000000000 +0200 @@ -49,6 +49,7 @@ def __init__(self, tests=()): """Initialize the suite. tests may be an iterable or a generator """ + super(LazySuite, self).__init__() self._set_tests(tests) def __iter__(self): @@ -154,7 +155,7 @@ self.has_run = False self.can_split = can_split self.error_context = None - LazySuite.__init__(self, tests) + super(ContextSuite, self).__init__(tests) def __repr__(self): return "<%s context=%s>" % ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose/util.py new/nose-1.3.6/nose/util.py --- old/nose-1.3.3/nose/util.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nose/util.py 2015-04-04 11:56:47.000000000 +0200 @@ -3,6 +3,7 @@ import inspect import itertools import logging +import stat import os import re import sys @@ -221,11 +222,11 @@ if relativeTo is None: relativeTo = os.getcwd() path = os.path.join(relativeTo, os.sep.join(package.split('.'))) - suffixes = ('/__init__.py', '.py') - for suffix in suffixes: - filename = path + suffix - if os.path.exists(filename): - return filename + if os.path.exists(path + '/__init__.py'): + return path + filename = path + '.py' + if os.path.exists(filename): + return filename return None @@ -452,7 +453,7 @@ inspect.getargspec(func) else: # Not a function. If it's callable, call it anyway - if hasattr(func, '__call__'): + if hasattr(func, '__call__') and not inspect.ismethod(func): func = func.__call__ try: args, varargs, varkw, defaults = \ @@ -654,7 +655,14 @@ for arg in val]) return unicode(val).encode(encoding) - + +def is_executable(file): + if not os.path.exists(file): + return False + st = os.stat(file) + return bool(st.st_mode & (stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)) + + if __name__ == '__main__': import doctest doctest.testmod() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose.egg-info/PKG-INFO new/nose-1.3.6/nose.egg-info/PKG-INFO --- old/nose-1.3.3/nose.egg-info/PKG-INFO 2014-05-06 11:54:08.000000000 +0200 +++ new/nose-1.3.6/nose.egg-info/PKG-INFO 2015-04-04 13:45:28.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: nose -Version: 1.3.3 +Version: 1.3.6 Summary: nose extends unittest to make testing easier Home-page: http://readthedocs.org/docs/nose/ Author: Jason Pellerin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nose.egg-info/SOURCES.txt new/nose-1.3.6/nose.egg-info/SOURCES.txt --- old/nose-1.3.3/nose.egg-info/SOURCES.txt 2014-05-06 11:54:08.000000000 +0200 +++ new/nose-1.3.6/nose.egg-info/SOURCES.txt 2015-04-04 13:45:28.000000000 +0200 @@ -235,6 +235,7 @@ functional_tests/support/issue700/test.py functional_tests/support/issue720/test.py functional_tests/support/issue771/test.py +functional_tests/support/issue859/test.py functional_tests/support/ltfn/state.py functional_tests/support/ltfn/test_mod.py functional_tests/support/ltfn/test_pak1/__init__.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/nosetests.1 new/nose-1.3.6/nosetests.1 --- old/nose-1.3.3/nosetests.1 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/nosetests.1 2015-04-04 11:56:47.000000000 +0200 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "NOSETESTS" "1" "March 10, 2014" "1.3" "nose" +.TH "NOSETESTS" "1" "April 04, 2015" "1.3" "nose" .SH NAME nosetests \- Nicer testing for Python . @@ -326,7 +326,7 @@ .INDENT 0.0 .TP .B \-\-nologcapture -Disable logging capture plugin. Logging configurtion will be left intact. [NOSE_NOLOGCAPTURE] +Disable logging capture plugin. Logging configuration will be left intact. [NOSE_NOLOGCAPTURE] .UNINDENT .INDENT 0.0 .TP @@ -557,6 +557,11 @@ .UNINDENT .INDENT 0.0 .TP +.B \-\-xunit\-testsuite\-name=PACKAGE +Name of the testsuite in the xunit xml, generated by plugin. Default test suite name is nosetests. +.UNINDENT +.INDENT 0.0 +.TP .B \-\-all\-modules Enable plugin AllModules: Collect tests from all python modules. [NOSE_ALL_MODULES] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/setup.py new/nose-1.3.6/setup.py --- old/nose-1.3.3/setup.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/setup.py 2015-04-04 13:45:24.000000000 +0200 @@ -1,7 +1,7 @@ import sys import os -VERSION = '1.3.3' +VERSION = '1.3.6' py_vers_tag = '-%s.%s' % sys.version_info[:2] test_dirs = ['functional_tests', 'unit_tests', os.path.join('doc','doc_tests'), 'nose'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.3/unit_tests/test_utils.py new/nose-1.3.6/unit_tests/test_utils.py --- old/nose-1.3.3/unit_tests/test_utils.py 2014-05-06 11:53:59.000000000 +0200 +++ new/nose-1.3.6/unit_tests/test_utils.py 2014-08-24 12:32:54.000000000 +0200 @@ -170,16 +170,22 @@ def __call__(self, mod): pass + class Bar_method: + def method(self): + pass + foo = imp.new_module('foo') foo.bar = bar foo.bar_m = bar_m foo.i_bar = Bar() foo.i_bar_m = Bar_m() + foo.i_bar_m = Bar_method().method try_run(foo, ('bar',)) try_run(foo, ('bar_m',)) try_run(foo, ('i_bar',)) try_run(foo, ('i_bar_m',)) + try_run(foo, ('i_bar_method',)) if __name__ == '__main__': unittest.main()