From dd47370469c429e298165da635843fd825f83daa64510c2904ea335b00b61d80 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Wed, 10 May 2023 08:08:06 +0000 Subject: [PATCH] - Add fix-tests.patch gh#nedbat/coveragepy@3fdda7d017ff - Update to 7.2.5: * Fix: html_report() could fail with an AttributeError on isatty if run in an unusual environment where sys.stdout had been replaced. This is now fixed. - 7.2.4: * Fix: with relative_files = true, specifying a specific file to include or omit wouldn't work correctly (issue 1604). This is now fixed, with testing help by Marc Gibbons. * Fix: the XML report would have an incorrect element when using relative files and the source option ended with a slash (issue 1541). This is now fixed, thanks to Kevin Brown-Silva. * When the HTML report location is printed to the terminal, it's now a terminal-compatible URL, so that you can click the location to open the HTML file in your browser. Finishes issue 1523 thanks to Ricardo Newbery. * Docs: a new :ref:`Migrating page ` with details about how to migrate between major versions of coverage.py. It currently covers the wildcard changes in 7.x. Thanks, Brian Grohe. - 7.2.3: * Fix: the :ref:`config_run_sigterm` setting was meant to capture data if a process was terminated with a SIGTERM signal, but it didn't always. This was fixed thanks to Lewis Gaul, closing issue 1599. * Performance: HTML reports with context information are now much more compact. File sizes are typically as small as one-third the previous size, but can be dramatically smaller. This closes issue 1584 thanks to Oleh Krehel. * Development dependencies no longer use hashed pins, closing issue 1592. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-coverage?expand=0&rev=116 --- coverage-7.2.2.tar.gz | 3 --- coverage-7.2.5.tar.gz | 3 +++ fix-tests.patch | 20 ++++++++++++++++++++ python-coverage.changes | 34 ++++++++++++++++++++++++++++++++++ python-coverage.spec | 4 +++- 5 files changed, 60 insertions(+), 4 deletions(-) delete mode 100644 coverage-7.2.2.tar.gz create mode 100644 coverage-7.2.5.tar.gz create mode 100644 fix-tests.patch diff --git a/coverage-7.2.2.tar.gz b/coverage-7.2.2.tar.gz deleted file mode 100644 index a155300..0000000 --- a/coverage-7.2.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:36dd42da34fe94ed98c39887b86db9d06777b1c8f860520e21126a75507024f2 -size 812407 diff --git a/coverage-7.2.5.tar.gz b/coverage-7.2.5.tar.gz new file mode 100644 index 0000000..3614d78 --- /dev/null +++ b/coverage-7.2.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f99ef080288f09ffc687423b8d60978cf3a465d3f404a18d1a05474bd8575a47 +size 759465 diff --git a/fix-tests.patch b/fix-tests.patch new file mode 100644 index 0000000..c85b5c0 --- /dev/null +++ b/fix-tests.patch @@ -0,0 +1,20 @@ +Index: coverage-7.2.5/tests/test_concurrency.py +=================================================================== +--- coverage-7.2.5.orig/tests/test_concurrency.py ++++ coverage-7.2.5/tests/test_concurrency.py +@@ -768,10 +768,11 @@ class SigtermTest(CoverageTest): + sigterm = true + """) + out = self.run_command("coverage run handler.py") +- if env.LINUX: +- assert out == "START\nSIGTERM\nTerminated\n" +- else: +- assert out == "START\nSIGTERM\n" ++ out_lines = out.splitlines() ++ assert len(out_lines) in [2, 3] ++ assert out_lines[:2] == ["START", "SIGTERM"] ++ if len(out_lines) == 3: ++ assert out_lines[2] == "Terminated" + out = self.run_command("coverage report -m") + expected = "handler.py 5 1 80% 6" + assert self.squeezed_lines(out)[2] == expected diff --git a/python-coverage.changes b/python-coverage.changes index 3dbbdf2..d694a79 100644 --- a/python-coverage.changes +++ b/python-coverage.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +Wed May 10 08:06:33 UTC 2023 - Daniel Garcia + +- Add fix-tests.patch gh#nedbat/coveragepy@3fdda7d017ff +- Update to 7.2.5: + * Fix: html_report() could fail with an AttributeError on isatty if + run in an unusual environment where sys.stdout had been replaced. + This is now fixed. +- 7.2.4: + * Fix: with relative_files = true, specifying a specific file to + include or omit wouldn't work correctly (issue 1604). This is now + fixed, with testing help by Marc Gibbons. + * Fix: the XML report would have an incorrect element when + using relative files and the source option ended with a slash + (issue 1541). This is now fixed, thanks to Kevin Brown-Silva. + * When the HTML report location is printed to the terminal, it's now + a terminal-compatible URL, so that you can click the location to + open the HTML file in your browser. Finishes issue 1523 thanks to + Ricardo Newbery. + * Docs: a new :ref:`Migrating page ` with details about + how to migrate between major versions of coverage.py. It currently + covers the wildcard changes in 7.x. Thanks, Brian Grohe. +- 7.2.3: + * Fix: the :ref:`config_run_sigterm` setting was meant to capture + data if a process was terminated with a SIGTERM signal, but it + didn't always. This was fixed thanks to Lewis Gaul, closing issue + 1599. + * Performance: HTML reports with context information are now much + more compact. File sizes are typically as small as one-third the + previous size, but can be dramatically smaller. This closes issue + 1584 thanks to Oleh Krehel. + * Development dependencies no longer use hashed pins, closing issue + 1592. + ------------------------------------------------------------------- Fri Apr 21 12:23:47 UTC 2023 - Dirk Müller diff --git a/python-coverage.spec b/python-coverage.spec index 03ebf4b..1ff8c85 100644 --- a/python-coverage.spec +++ b/python-coverage.spec @@ -18,12 +18,14 @@ %{?sle15_python_module_pythons} Name: python-coverage -Version: 7.2.2 +Version: 7.2.5 Release: 0 Summary: Code coverage measurement for Python License: Apache-2.0 URL: https://github.com/nedbat/coveragepy Source: https://files.pythonhosted.org/packages/source/c/coverage/coverage-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix-tests.patch -- gh#nedbat/coveragepy@3fdda7d017ff +Patch0: fix-tests.patch BuildRequires: %{python_module devel >= 3.7} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools}