From 4fd2623c1275ab34e750513bff4367f190291d34 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 8 Apr 2020 18:11:04 +0200 Subject: [PATCH] tests: fix TypeErrors (#7038) * tests: fix TypeError with test_mark_closest It fails when trying to run it actually: > TypeError: test_has_inherited() takes 0 positional arguments but 1 was given * Fix testing/test_collection.py::TestCollector::test_getparent --- testing/test_collection.py | 4 ++-- testing/test_mark.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testing/test_collection.py b/testing/test_collection.py index 90c248b4a..050b54598 100644 --- a/testing/test_collection.py +++ b/testing/test_collection.py @@ -53,8 +53,8 @@ class TestCollector: def test_getparent(self, testdir): modcol = testdir.getmodulecol( """ - class TestClass(object): - def test_foo(): + class TestClass: + def test_foo(self): pass """ ) diff --git a/testing/test_mark.py b/testing/test_mark.py index 76ee289b6..530f9f168 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -533,10 +533,10 @@ class TestFunctional: @pytest.mark.c(location="class") class Test: @pytest.mark.c(location="function") - def test_has_own(): + def test_has_own(self): pass - def test_has_inherited(): + def test_has_inherited(self): pass """