Hello community, here is the log from the commit of package python3-nose for openSUSE:Factory checked in at 2015-04-12 00:07:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-nose (Old) and /work/SRC/openSUSE:Factory/.python3-nose.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-nose" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-nose/python3-nose-doc.changes 2015-01-06 09:06:23.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-nose.new/python3-nose-doc.changes 2015-04-12 00:07:38.000000000 +0200 @@ -1,0 +2,26 @@ +Tue Apr 7 17:33:13 UTC 2015 - [email protected] + +- 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. + 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. + +------------------------------------------------------------------- +Sun Jan 10 00:51:53 UTC 2015 - [email protected] + +- specfile: + * remove ifs for opensuse version <=1220 + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/python3-nose/python3-nose.changes 2015-01-06 09:06:23.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-nose.new/python3-nose.changes 2015-04-12 00:07:38.000000000 +0200 @@ -1,0 +2,20 @@ +Tue Apr 7 17:33:13 UTC 2015 - [email protected] + +- 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. + 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. + +------------------------------------------------------------------- Old: ---- nose-1.3.4.tar.gz New: ---- nose-1.3.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-nose-doc.spec ++++++ --- /var/tmp/diff_new_pack.Z7lzhF/_old 2015-04-12 00:07:40.000000000 +0200 +++ /var/tmp/diff_new_pack.Z7lzhF/_new 2015-04-12 00:07:40.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package python3-nose-doc # -# Copyright (c) 2015 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: python3-nose-doc -Version: 1.3.4 +Version: 1.3.6 Release: 0 Url: http://readthedocs.org/docs/nose/ Summary: Nose extends unittest to make testing easier ++++++ python3-nose.spec ++++++ --- /var/tmp/diff_new_pack.Z7lzhF/_old 2015-04-12 00:07:40.000000000 +0200 +++ /var/tmp/diff_new_pack.Z7lzhF/_new 2015-04-12 00:07:40.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package python3-nose # -# Copyright (c) 2015 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: python3-nose -Version: 1.3.4 +Version: 1.3.6 Release: 0 Url: http://readthedocs.org/docs/nose/ Summary: Nose extends unittest to make testing easier @@ -28,17 +28,9 @@ BuildRequires: python3 BuildRequires: python3-devel BuildRequires: python3-setuptools -%if 0%{?suse_version} <= 1220 -BuildRequires: python3-2to3 -BuildRequires: python3-xml -%endif #Test requirements: BuildRequires: python3-coverage Requires: python3-setuptools -%if 0%{?suse_version} <= 1220 -Requires: python3-2to3 -Requires: python3-xml -%endif Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch ++++++ nose-1.3.4.tar.gz -> nose-1.3.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/CHANGELOG new/nose-1.3.6/CHANGELOG --- old/nose-1.3.4/CHANGELOG 2014-08-24 12:27:59.000000000 +0200 +++ new/nose-1.3.6/CHANGELOG 2015-04-04 13:45:24.000000000 +0200 @@ -1,3 +1,20 @@ +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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/NEWS new/nose-1.3.6/NEWS --- old/nose-1.3.4/NEWS 2014-08-24 12:56:22.000000000 +0200 +++ new/nose-1.3.6/NEWS 2015-04-04 12:19:15.000000000 +0200 @@ -1,8 +1,9 @@ -1.3.4 +1.3.5 ----- -1.3.4 fixes an issue with Python 3.4 and initializing a TestSuite -properly, along with a couple of other minor issues. +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 @@ -10,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.4/PKG-INFO new/nose-1.3.6/PKG-INFO --- old/nose-1.3.4/PKG-INFO 2014-08-24 13:10:29.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.4 +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.4/README.txt new/nose-1.3.6/README.txt --- old/nose-1.3.4/README.txt 2014-05-20 12:36:35.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.4/functional_tests/doc_tests/test_init_plugin/example.cfg new/nose-1.3.6/functional_tests/doc_tests/test_init_plugin/example.cfg --- old/nose-1.3.4/functional_tests/doc_tests/test_init_plugin/example.cfg 2014-08-24 12:41:40.000000000 +0200 +++ new/nose-1.3.6/functional_tests/doc_tests/test_init_plugin/example.cfg 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -[DEFAULT] -can_frobnicate = 1 -likes_cheese = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/functional_tests/doc_tests/test_xunit_plugin/support/nosetests.xml new/nose-1.3.6/functional_tests/doc_tests/test_xunit_plugin/support/nosetests.xml --- old/nose-1.3.4/functional_tests/doc_tests/test_xunit_plugin/support/nosetests.xml 2014-08-24 12:41:42.000000000 +0200 +++ new/nose-1.3.6/functional_tests/doc_tests/test_xunit_plugin/support/nosetests.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><testsuite name="nosetests" tests="4" errors="1" failures="1" skip="1"><testcase classname="test_skip" name="test_ok" time="0.001"></testcase><testcase classname="test_skip" name="test_err" time="0.000"><error type="exceptions.Exception" message="oh no"><![CDATA[Traceback (most recent call last): - File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 331, in run - testMethod() - File "/Users/jszakmeister/projects/nose/nose/case.py", line 197, in runTest - self.test(*self.arg) - File "/Users/jszakmeister/projects/nose/functional_tests/doc_tests/test_xunit_plugin/support/test_skip.py", line 7, in test_err - raise Exception("oh no") -Exception: oh no -]]></error></testcase><testcase classname="test_skip" name="test_fail" time="0.000"><failure type="exceptions.AssertionError" message="bye"><![CDATA[Traceback (most recent call last): - File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 331, in run - testMethod() - File "/Users/jszakmeister/projects/nose/nose/case.py", line 197, in runTest - self.test(*self.arg) - File "/Users/jszakmeister/projects/nose/functional_tests/doc_tests/test_xunit_plugin/support/test_skip.py", line 10, in test_fail - assert False, "bye" -AssertionError: bye -]]></failure></testcase><testcase classname="test_skip" name="test_skip" time="0.000"><skipped type="unittest.case.SkipTest" message="not me"><![CDATA[SkipTest: not me -]]></skipped></testcase></testsuite> \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/functional_tests/nosetests.xml new/nose-1.3.6/functional_tests/nosetests.xml --- old/nose-1.3.4/functional_tests/nosetests.xml 2013-05-03 11:23:38.000000000 +0200 +++ new/nose-1.3.6/functional_tests/nosetests.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><testsuite name="nosetests" tests="1" errors="0" failures="0" skip="0"><testcase classname="test" name="test_foo" time="0.000"><system-out><![CDATA[abc€ -]]></system-out></testcase></testsuite> \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/functional_tests/support/issue191/UNKNOWN.egg-info/PKG-INFO new/nose-1.3.6/functional_tests/support/issue191/UNKNOWN.egg-info/PKG-INFO --- old/nose-1.3.4/functional_tests/support/issue191/UNKNOWN.egg-info/PKG-INFO 2014-08-24 12:41:42.000000000 +0200 +++ new/nose-1.3.6/functional_tests/support/issue191/UNKNOWN.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: UNKNOWN -Version: 0.0.0 -Summary: UNKNOWN -Home-page: UNKNOWN -Author: UNKNOWN -Author-email: UNKNOWN -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/functional_tests/support/issue191/UNKNOWN.egg-info/SOURCES.txt new/nose-1.3.6/functional_tests/support/issue191/UNKNOWN.egg-info/SOURCES.txt --- old/nose-1.3.4/functional_tests/support/issue191/UNKNOWN.egg-info/SOURCES.txt 2014-08-24 12:41:43.000000000 +0200 +++ new/nose-1.3.6/functional_tests/support/issue191/UNKNOWN.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -setup.cfg -setup.py -UNKNOWN.egg-info/PKG-INFO -UNKNOWN.egg-info/SOURCES.txt -UNKNOWN.egg-info/dependency_links.txt -UNKNOWN.egg-info/top_level.txt \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/functional_tests/support/issue191/UNKNOWN.egg-info/dependency_links.txt new/nose-1.3.6/functional_tests/support/issue191/UNKNOWN.egg-info/dependency_links.txt --- old/nose-1.3.4/functional_tests/support/issue191/UNKNOWN.egg-info/dependency_links.txt 2014-08-24 12:41:42.000000000 +0200 +++ new/nose-1.3.6/functional_tests/support/issue191/UNKNOWN.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/functional_tests/support/issue191/UNKNOWN.egg-info/top_level.txt new/nose-1.3.6/functional_tests/support/issue191/UNKNOWN.egg-info/top_level.txt --- old/nose-1.3.4/functional_tests/support/issue191/UNKNOWN.egg-info/top_level.txt 2014-08-24 12:41:42.000000000 +0200 +++ new/nose-1.3.6/functional_tests/support/issue191/UNKNOWN.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/functional_tests/support/issue859/test.py new/nose-1.3.6/functional_tests/support/issue859/test.py --- old/nose-1.3.4/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.4/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.4/functional_tests/support/package2/test_pak/__init__.py 2012-09-29 10:18:54.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.4/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.4/functional_tests/support/package2/test_pak/test_sub/__init__.py 2012-09-29 10:18:54.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.4/functional_tests/support/xunit.xml new/nose-1.3.6/functional_tests/support/xunit.xml --- old/nose-1.3.4/functional_tests/support/xunit.xml 2014-08-24 12:41:51.000000000 +0200 +++ new/nose-1.3.6/functional_tests/support/xunit.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><testsuite name="nosetests" tests="6" errors="2" failures="1" skip="1"><testcase classname="test_xunit_as_suite.TestForXunit" name="test_error" time="0.001"><error type="exceptions.TypeError" message="oops, wrong type"><![CDATA[Traceback (most recent call last): - File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 331, in run - testMethod() - File "/Users/jszakmeister/projects/nose/functional_tests/support/xunit/test_xunit_as_suite.py", line 15, in test_error - raise TypeError("oops, wrong type") -TypeError: oops, wrong type -]]></error></testcase><testcase classname="test_xunit_as_suite.TestForXunit" name="test_fail" time="0.000"><failure type="exceptions.AssertionError" message="'this' != 'that'"><![CDATA[Traceback (most recent call last): - File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 331, in run - testMethod() - File "/Users/jszakmeister/projects/nose/functional_tests/support/xunit/test_xunit_as_suite.py", line 12, in test_fail - self.assertEqual("this","that") - File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 515, in assertEqual - assertion_func(first, second, msg=msg) - File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 508, in _baseAssertEqual - raise self.failureException(msg) -AssertionError: 'this' != 'that' -]]></failure></testcase><testcase classname="test_xunit_as_suite.TestForXunit" name="test_non_ascii_error" time="0.000"><error type="exceptions.Exception" message="日本"><![CDATA[Traceback (most recent call last): - File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 331, in run - testMethod() - File "/Users/jszakmeister/projects/nose/functional_tests/support/xunit/test_xunit_as_suite.py", line 18, in test_non_ascii_error - raise Exception(u"日本") -Exception: \u65e5\u672c -]]></error></testcase><testcase classname="test_xunit_as_suite.TestForXunit" name="test_output" time="0.000"><system-out><![CDATA[test-generated output -]]></system-out></testcase><testcase classname="test_xunit_as_suite.TestForXunit" name="test_skip" time="0.000"><skipped type="twisted.trial.unittest.SkipTest" message="skipit"><![CDATA[SkipTest: skipit -]]></skipped></testcase><testcase classname="test_xunit_as_suite.TestForXunit" name="test_success" time="0.000"></testcase></testsuite> \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/functional_tests/test_coverage_plugin.py new/nose-1.3.6/functional_tests/test_coverage_plugin.py --- old/nose-1.3.4/functional_tests/test_coverage_plugin.py 2014-04-20 14:52:56.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.4/functional_tests/test_loader.py new/nose-1.3.6/functional_tests/test_loader.py --- old/nose-1.3.4/functional_tests/test_loader.py 2012-09-29 10:18:54.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.4/functional_tests/test_program.py new/nose-1.3.6/functional_tests/test_program.py --- old/nose-1.3.4/functional_tests/test_program.py 2014-04-19 14:23:53.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.4/functional_tests/test_xunit.py new/nose-1.3.6/functional_tests/test_xunit.py --- old/nose-1.3.4/functional_tests/test_xunit.py 2014-04-20 14:52:56.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.4/nose/__init__.py new/nose-1.3.6/nose/__init__.py --- old/nose-1.3.4/nose/__init__.py 2014-08-24 12:52:24.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, 4) +__versioninfo__ = (1, 3, 6) __version__ = '.'.join(map(str, __versioninfo__)) __all__ = [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/nose/config.py new/nose-1.3.6/nose/config.py --- old/nose-1.3.4/nose/config.py 2014-08-13 11:44:58.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.4/nose/loader.py new/nose-1.3.6/nose/loader.py --- old/nose-1.3.4/nose/loader.py 2014-04-20 21:49:20.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.4/nose/plugins/cover.py new/nose-1.3.6/nose/plugins/cover.py --- old/nose-1.3.4/nose/plugins/cover.py 2014-08-24 12:22:44.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.4/nose/plugins/testid.py new/nose-1.3.6/nose/plugins/testid.py --- old/nose-1.3.4/nose/plugins/testid.py 2014-08-10 12:17:49.000000000 +0200 +++ new/nose-1.3.6/nose/plugins/testid.py 2015-04-04 11:56:47.000000000 +0200 @@ -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.4/nose/plugins/xunit.py new/nose-1.3.6/nose/plugins/xunit.py --- old/nose-1.3.4/nose/plugins/xunit.py 2014-04-20 15:50:04.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.4/nose/pyversion.py new/nose-1.3.6/nose/pyversion.py --- old/nose-1.3.4/nose/pyversion.py 2014-04-20 14:52:56.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.4/nose/selector.py new/nose-1.3.6/nose/selector.py --- old/nose-1.3.4/nose/selector.py 2012-09-29 10:18:54.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.4/nose/util.py new/nose-1.3.6/nose/util.py --- old/nose-1.3.4/nose/util.py 2014-05-12 11:15:45.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 @@ -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.4/nose.egg-info/PKG-INFO new/nose-1.3.6/nose.egg-info/PKG-INFO --- old/nose-1.3.4/nose.egg-info/PKG-INFO 2014-08-24 13:10:29.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.4 +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.4/nose.egg-info/SOURCES.txt new/nose-1.3.6/nose.egg-info/SOURCES.txt --- old/nose-1.3.4/nose.egg-info/SOURCES.txt 2014-08-24 13:10:29.000000000 +0200 +++ new/nose-1.3.6/nose.egg-info/SOURCES.txt 2015-04-04 13:45:28.000000000 +0200 @@ -80,7 +80,6 @@ examples/html_plugin/setup.py examples/plugin/plug.py examples/plugin/setup.py -functional_tests/nosetests.xml functional_tests/test_attribute_plugin.py functional_tests/test_buggy_generators.py functional_tests/test_cases.py @@ -123,7 +122,6 @@ functional_tests/doc_tests/test_allmodules/support/test.py functional_tests/doc_tests/test_doctest_fixtures/doctest_fixtures.rst functional_tests/doc_tests/test_doctest_fixtures/doctest_fixtures_fixtures.py -functional_tests/doc_tests/test_init_plugin/example.cfg functional_tests/doc_tests/test_init_plugin/init_plugin.rst functional_tests/doc_tests/test_init_plugin/init_plugin.rst.py3.patch functional_tests/doc_tests/test_issue089/unwanted_package.rst @@ -168,11 +166,9 @@ functional_tests/doc_tests/test_selector_plugin/support/tests/mymodule/my_function.py functional_tests/doc_tests/test_selector_plugin/support/tests/strings/cat.py functional_tests/doc_tests/test_xunit_plugin/test_skips.rst -functional_tests/doc_tests/test_xunit_plugin/support/nosetests.xml functional_tests/doc_tests/test_xunit_plugin/support/test_skip.py functional_tests/support/test.cfg functional_tests/support/test_buggy_generators.py -functional_tests/support/xunit.xml functional_tests/support/att/test_attr.py functional_tests/support/attrib-static/test.py functional_tests/support/coverage/blah.py @@ -230,13 +226,8 @@ functional_tests/support/issue191/setup.cfg functional_tests/support/issue191/setup.py functional_tests/support/issue191/test.py -functional_tests/support/issue191/UNKNOWN.egg-info/PKG-INFO -functional_tests/support/issue191/UNKNOWN.egg-info/SOURCES.txt -functional_tests/support/issue191/UNKNOWN.egg-info/dependency_links.txt -functional_tests/support/issue191/UNKNOWN.egg-info/top_level.txt functional_tests/support/issue269/test_bad_class.py functional_tests/support/issue279/test_mod_setup_fails.py -functional_tests/support/issue408/nosetests.xml functional_tests/support/issue408/test.py functional_tests/support/issue513/test.py functional_tests/support/issue649/test.py @@ -244,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 @@ -409,7 +401,6 @@ unit_tests/support/doctest/err_doctests.py unit_tests/support/doctest/no_doctests.py unit_tests/support/doctest/noname_wrapped.not_py -unit_tests/support/doctest/noname_wrapped.not_pyc unit_tests/support/doctest/noname_wrapper.py unit_tests/support/foo/__init__.py unit_tests/support/foo/doctests.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nose-1.3.4/nosetests.1 new/nose-1.3.6/nosetests.1 --- old/nose-1.3.4/nosetests.1 2014-05-20 12:41:02.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.4/setup.py new/nose-1.3.6/setup.py --- old/nose-1.3.4/setup.py 2014-08-24 12:51:05.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.4' +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'] Files old/nose-1.3.4/unit_tests/support/doctest/noname_wrapped.not_pyc and new/nose-1.3.6/unit_tests/support/doctest/noname_wrapped.not_pyc differ
