diff options
| author | Miro Hrončok <miro@hroncok.cz> | 2020-07-20 13:18:23 +0200 |
|---|---|---|
| committer | Miro Hrončok <miro@hroncok.cz> | 2020-07-20 17:49:12 +0200 |
| commit | 91b09d5b376cfb8afd4b6af5b407f57aa42011c7 (patch) | |
| tree | cdfb0318f80409ecdf2b601cab65f3ca843d3477 /docs | |
| parent | a7be77f761a4c29121d6bb6f61c11902281f9105 (diff) | |
| download | flake8-91b09d5b376cfb8afd4b6af5b407f57aa42011c7.tar.gz | |
Tests: Add a value to mocked entry_points, so pytest 6+ can log it
Pytest 6.0.0rc1 attempts to log a repr of our mocked entry_point,
but it fails, becasue the repr metohod expects a valua attribute:
Reproducer:
$ tox -e py38 --force-dep 'pytest==6.0.0rc1'
...
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/__init__.py", line 1081, in emit
msg = self.format(record)
File "/usr/lib/python3.8/logging/__init__.py", line 925, in format
return fmt.format(record)
File "/usr/lib/python3.8/logging/__init__.py", line 664, in format
record.message = record.getMessage()
File "/usr/lib/python3.8/logging/__init__.py", line 369, in getMessage
msg = msg % self.args
File "/tmp/flake8/.tox/py38/lib/python3.8/site-packages/flake8/plugins/manager.py", line 44, in __repr__
self.name, self.entry_point.value
File "/tmp/flake8/.tox/py38/lib/python3.8/site-packages/mock/mock.py", line 632, in __getattr__
raise AttributeError("Mock object has no attribute %r" % name)
AttributeError: Mock object has no attribute 'value'
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
