diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/nose/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/nose/files')
3 files changed, 141 insertions, 0 deletions
diff --git a/dev-python/nose/files/nose-1.3.7-coverage-4.1-support.patch b/dev-python/nose/files/nose-1.3.7-coverage-4.1-support.patch new file mode 100644 index 000000000000..87577871b613 --- /dev/null +++ b/dev-python/nose/files/nose-1.3.7-coverage-4.1-support.patch @@ -0,0 +1,20 @@ +--- a/nose/plugins/cover.py 2016-10-11 15:51:26.990868010 +0200 ++++ b/nose/plugins/cover.py 2016-10-11 15:52:28.261102027 +0200 +@@ -187,7 +187,7 @@ + for name, module in sys.modules.items() + if self.wantModuleCoverage(name, module)] + log.debug("Coverage report will cover modules: %s", modules) +- self.coverInstance.report(modules, file=stream) ++ self.coverInstance.report(modules, file=stream, show_missing=True) + + import coverage + if self.coverHtmlDir: +@@ -207,7 +207,7 @@ + # make sure we have minimum required coverage + if self.coverMinPercentage: + f = StringIO.StringIO() +- self.coverInstance.report(modules, file=f) ++ self.coverInstance.report(modules, file=f, show_missing=True) + + multiPackageRe = (r'-------\s\w+\s+\d+\s+\d+(?:\s+\d+\s+\d+)?' + r'\s+(\d+)%\s+\d*\s{0,1}$') diff --git a/dev-python/nose/files/nose-1.3.7-python-3.5-backport.patch b/dev-python/nose/files/nose-1.3.7-python-3.5-backport.patch new file mode 100644 index 000000000000..8d2f2f05dc29 --- /dev/null +++ b/dev-python/nose/files/nose-1.3.7-python-3.5-backport.patch @@ -0,0 +1,54 @@ +From 8e7ad3d50012688ca029d126cbc88251831fea88 Mon Sep 17 00:00:00 2001 +From: Dmitry Shachnev <mitya57@gmail.com> +Date: Mon, 1 Feb 2016 00:05:30 +0300 +Subject: [PATCH 1/2] Set __qualname__ equal to __name__ on derived classes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +To make output on Python ≥ 3.5 the same as on previous Python versions. + +This fixes #928. +--- + functional_tests/test_load_tests_from_test_case.py | 1 + + nose/util.py | 1 + + unit_tests/test_xunit.py | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/functional_tests/test_load_tests_from_test_case.py b/functional_tests/test_load_tests_from_test_case.py +index 42f8563..13d0c8a 100644 +--- a/functional_tests/test_load_tests_from_test_case.py ++++ b/functional_tests/test_load_tests_from_test_case.py +@@ -29,6 +29,7 @@ def setUp(self): + pass + def tearDown(self): + pass ++ Derived.__qualname__ = Derived.__name__ + # must use nose loader here because the default loader in 2.3 + # won't load tests from base classes + l = loader.TestLoader() +diff --git a/nose/util.py b/nose/util.py +index bfe1658..80ab1d4 100644 +--- a/nose/util.py ++++ b/nose/util.py +@@ -643,6 +643,7 @@ class C(cls): + pass + C.__module__ = module + C.__name__ = cls.__name__ ++ C.__qualname__ = cls.__name__ + return C + + +diff --git a/unit_tests/test_xunit.py b/unit_tests/test_xunit.py +index 944d285..261436b 100644 +--- a/unit_tests/test_xunit.py ++++ b/unit_tests/test_xunit.py +@@ -16,6 +16,7 @@ def mktest(): + class TC(unittest.TestCase): + def runTest(self): + pass ++ TC.__qualname__ = TC.__name__ + test = TC() + return test + + diff --git a/dev-python/nose/files/nose-1.3.7-python-3.6-test.patch b/dev-python/nose/files/nose-1.3.7-python-3.6-test.patch new file mode 100644 index 000000000000..eda10ff036cf --- /dev/null +++ b/dev-python/nose/files/nose-1.3.7-python-3.6-test.patch @@ -0,0 +1,67 @@ +From 84bb82245d10798825439dc13846eb0538d84239 Mon Sep 17 00:00:00 2001 +From: Tomas Orsava <torsava@redhat.com> +Date: Mon, 12 Dec 2016 14:35:50 +0100 +Subject: [PATCH] Fix compatibility with Python 3.6 + +Python 3.6 returns ModuleNotFoundError instead of the previous ImportError. +https://github.com/nose-devs/nose/pull/1029 +--- + functional_tests/test_loader.py | 2 +- + functional_tests/test_withid_failures.rst | 12 ++++++------ + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/functional_tests/test_loader.py b/functional_tests/test_loader.py +index 104f220..906e2ba 100644 +--- a/functional_tests/test_loader.py ++++ b/functional_tests/test_loader.py +@@ -372,7 +372,7 @@ def test_failed_import_module_name(self): + assert res.errors, "Expected errors but got none" + assert not res.failures, res.failures + err = res.errors[0][0].test.exc_class +- assert err is ImportError, \ ++ assert issubclass(err, ImportError), \ + "Expected import error, got %s" % err + + def test_load_nonsense_name(self): +diff --git a/functional_tests/test_withid_failures.rst b/functional_tests/test_withid_failures.rst +index cf09d4f..cb20886 100644 +--- a/functional_tests/test_withid_failures.rst ++++ b/functional_tests/test_withid_failures.rst +@@ -7,16 +7,16 @@ + >>> support = os.path.join(os.path.dirname(__file__), 'support', 'id_fails') + >>> argv = [__file__, '-v', '--with-id', '--id-file', idfile, support] + >>> run(argv=argv, plugins=[TestId()]) # doctest: +ELLIPSIS +- #1 Failure: ImportError (No module ...apackagethatdoesntexist...) ... ERROR ++ #1 Failure: ... (No module ...apackagethatdoesntexist...) ... ERROR + #2 test_b.test ... ok + #3 test_b.test_fail ... FAIL + <BLANKLINE> + ====================================================================== +- ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...) ++ ERROR: Failure: ... (No module ...apackagethatdoesntexist...) + ---------------------------------------------------------------------- + Traceback (most recent call last): + ... +- ImportError: No module ...apackagethatdoesntexist... ++ ...: No module ...apackagethatdoesntexist... + <BLANKLINE> + ====================================================================== + FAIL: test_b.test_fail +@@ -35,14 +35,14 @@ Addressing failures works (sometimes). + >>> argv.append('1') + >>> _junk = sys.modules.pop('test_a', None) # 2.3 requires + >>> run(argv=argv, plugins=[TestId()]) #doctest: +ELLIPSIS +- #1 Failure: ImportError (No module ...apackagethatdoesntexist...) ... ERROR ++ #1 Failure: ... (No module ...apackagethatdoesntexist...) ... ERROR + <BLANKLINE> + ====================================================================== +- ERROR: Failure: ImportError (No module ...apackagethatdoesntexist...) ++ ERROR: Failure: ... (No module ...apackagethatdoesntexist...) + ---------------------------------------------------------------------- + Traceback (most recent call last): + ... +- ImportError: No module ...apackagethatdoesntexist... ++ ...: No module ...apackagethatdoesntexist... + <BLANKLINE> + ---------------------------------------------------------------------- + Ran 1 test in ...s |