Skip to content

Commit eacc8d9

Browse files
committed
Add readme + license 0BSD
1 parent 1ad9d57 commit eacc8d9

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

LICENSE

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Permission to use, copy, modify, and/or distribute this software for any
2+
purpose with or without fee is hereby granted.
3+
4+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
5+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
6+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
7+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
8+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
9+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
10+
PERFORMANCE OF THIS SOFTWARE.

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# pytest-cov-test - Simplified demonstration of GitPython#2052
2+
3+
This is a simplified demonstration of the mechanism underlying the bug fixed in
4+
[gitpython-developers/GitPython#2052](https://github.com/gitpython-developers/GitPython/pull/2052)
5+
where a test that runs a subprocess, making an assertion about what the
6+
subprocess writes to stderr, can fail due to `CoverageWarning` messages
7+
produced in the subprocess by `pytest-cov`.
8+
9+
## The failure
10+
11+
As there, it is specifically on Cygwin that this currently fails, since the
12+
warning is not typically generated otherwise. The failure looks like:
13+
14+
```text
15+
> assert proc.stderr == f"{sys.executable=}\n"
16+
E assert "/home/ek/rep...bin/python'\n" == "sys.executab...bin/python'\n"
17+
E
18+
E + /home/ek/repos-cygwin/pytest-cov-test/.venv/lib/python3.9/site-packages/coverage/core.py:96: CoverageWarning: Couldn't import C tracer: No module named 'coverage.tracer' (no-ctracer)
19+
E + warn(f"Couldn't import C tracer: {IMPORT_ERROR}", slug="no-ctracer", once=True)
20+
E sys.executable='/home/ek/repos-cygwin/pytest-cov-test/.venv/bin/python'
21+
22+
test_indirect.py:14: AssertionError
23+
```
24+
25+
## License
26+
27+
[0BSD](LICENSE)

0 commit comments

Comments
 (0)