Running into a weird issue with Python code covera...
# general
Running into a weird issue with Python code coverage. I'm using Pytest and
, and am trying to refactor a bit of code to use Python's "walrus operator", introduced in Python 3.8. I'm using Python 3.8.13, my syntax is correct, my tests run and pass, but the coverage reporting fails with the following:
Copy code
10:40:26.59 [ERROR] 1 Exception encountered:

  ProcessExecutionFailure: Process 'Generate Pytest xml coverage report.' failed with exit code 1.
Couldn't parse '/tmp/process-executionhBLEdi/build-support/' as Python source: 'invalid syntax' at line 23

This line is where the walrus operator was introduced. I'm using
3.0.0, which supports Python 3.10. I see no issues or PRs about this in either Pytest or `pytest-cov`'s repositories. Is it possible that something in how Pants is running things is causing this? Has anybody else seen anything like this? Thanks in advance.
Ah, probably so... guess I missed this 😕 Out of curiosity, why doesn't this default to using the globally defined interpreter constraints? My expectation is that I would need to override a particular tool's constraints if I didn't want it using the global constraints, not the other way around.
perhaps it should. ponders the problem generally, that the fact individual tests might run w/ different interpreter constraints is the root of the problem
gotcha, thanks. In any event, setting a constraint for
does the trick for me 👍
👍 1