Where should I report coverage-pytest-attrs behavior? #9459
Replies: 4 comments 9 replies
|
What are "temporary representation files"? |
|
I had the same issue. It disappeared by downgrading attrs to 21.2.0 test_allinclusive.py import unittest
from flask import Flask
def initialize_app():
app = Flask(__name__)
app.config["RESTX_MASK_SWAGGER"] = False
return app
app = initialize_app()
class empfehlungstypen_api_test(unittest.TestCase):
def setUp(self):
self.app = app.test_client()
def test_empfehlungstypen(self):
response = self.app.get(
"/dummyurl",
headers={"x-api-key": "pleaseChangeMe_env:API_KEY"},
)
self.assertEqual("404 NOT FOUND", response.status)I then ran this test with Ran this with python 3.8.9 with a virtualenv and the following dependencies installed: when I switch to |
|
It's a bug in attrs: python-attrs/attrs#895. They have a PR up which fixes it. |
|
I think the best approach would be to first identify which dependency is creating the temporary files and then check whether the behavior is expected or a regression. Freezing dependency versions can also help prevent unexpected changes in future builds. The same kind of dependency checking is useful when maintaining Android app versions across different environments, especially when older devices or libraries are involved. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Context
I use
coverage run -m pytestto calculate coverage stats on my code. Today, thecoverage reportfailed because some temporary representation files named./repr,./rep-1,./rep-2and so on were no longer available.The source of the temporary representation files is the
attrslibrary version21.3.0published 28 December 2021.pytestdepends onattrs.Obviously, one way I could have and will avoid surprises in the future is to freeze all dependencies, including the transitive ones.
coverage reportsuggested adding the--ignore-errorsflag, but I don't want to adopt that as a permanent solution in case it hides other errors.Questions
Where should I log an issue?
attrs- though perhaps the temporary representation file is intended?pytest- as a request to avoid use ofattrs==21.3.0specifically?coverage- to automatically ignore failures for seeming temporary representation files?Or does it not merit an issue and I should find a wiki knowledge base to document this known behavior?
All reactions