-
Notifications
You must be signed in to change notification settings - Fork 22
pytest 6.0.0rc1: TypeError: append() takes exactly one argument (5 given) #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Looks like this is to blame: https://github.com/pytest-dev/pytest-forked/blob/master/testing/conftest.py Apparently pytest-forked patches |
Tried a quick fix: diff --git i/testing/conftest.py w/testing/conftest.py
index 745c00f..e8343a4 100644
--- i/testing/conftest.py
+++ w/testing/conftest.py
@@ -4,6 +4,17 @@ import pytest
pytest_plugins = "pytester"
+class AtExitFunc:
+
+ def __init__(self, func, *args, **kwargs):
+ self.func = func
+ self.args = args
+ self.kwargs = kwargs
+
+ def __call__(self):
+ self.func(*self.args, **self.kwargs)
+
+
@pytest.fixture(autouse=True)
def _divert_atexit(request, monkeypatch):
import atexit
@@ -13,5 +24,6 @@ def _divert_atexit(request, monkeypatch):
while atexit_fns:
atexit_fns.pop()()
- monkeypatch.setattr(atexit, "register", atexit_fns.append)
+ monkeypatch.setattr(atexit, "register", lambda func, *args, **kwargs:
+ atexit_fns.append(AtExitFunc(func, *args, **kwargs)))
request.addfinalizer(finish) but I can't seem to successfully run the tests locally, so it'd be good if someone else could pick this up. |
If anybody sends this as a PR, we'll see if it explodes in the current CI setup... |
/me needs to add a toxenv hitting pytest master... |
I suppose the CI setup doesn't tell the whole story as it doesn't actually test against pytest 6. I suppose having the |
Yeah, I guess there should be pytest-latest + pytest-stable + pytest-unstable |
|
@hroncok I assume this is after my patch above? Looks like pytest-forked is using private pytest APIs which moved around with 6.0. I assume adjusting the import to do |
Indeed. |
I am taking @The-Compiler's work and will submit a PR. There are other failures afterwards which I'm still working on. |
@bluetech great! Feel free to submit a draft PR so that any WIP failures are visible in the CI logs. |
Hello, this is pytest-forked @ b29c386:
Not sure if this is a pytest bug or pytest-forked needs to change something. The traceback mostly shows pytest code only :/
The text was updated successfully, but these errors were encountered: