forked from pool/python-coverage
- 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 <source> 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 <migrating>` 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
This commit is contained in:
20
fix-tests.patch
Normal file
20
fix-tests.patch
Normal file
@@ -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
|
Reference in New Issue
Block a user