Skip to content

Commit 886ffe6

Browse files
committed
init
Output: % pytest -svv ============== test session starts =============== platform linux -- Python 3.7.4, pytest-5.0.2.dev72+g4abf95ba4, py-1.7.0, pluggy-0.12.0 -- /home/daniel/Vcs/pytest-django/.venv/bin/python cachedir: .pytest_cache Django settings: pytest_django_test.settings_sqlite_file (from ini file) rootdir: /home/daniel/Vcs/pytest-django, inifile: setup.cfg plugins: forked-0.2, cov-2.6.1, django-3.5.1.dev1+ng33aa666 collected 3 items test_test.py::Test::test_1st <- t-unittest/mod1/__init__.py test_1st <test_test.Test object at 0x7f377a157990> PASSED test_test.py::Test::test_2nd <- t-unittest/mod2/__init__.py test_2nd <test_test.Test object at 0x7f377a067910> PASSED test_test.py::Test::test_test test_test <test_test.Test object at 0x7f377a0f11d0> PASSED ============ 3 passed in 0.05 seconds ============
0 parents  commit 886ffe6

File tree

5 files changed

+22
-0
lines changed

5 files changed

+22
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Debug pytest / pytest-django unittest issue (https://github.com/pytest-dev/pytest-django/issues/753)

mixin.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class MyMixin:
2+
def setUpClass(cls):
3+
print('MyMixin.setUpClass', cls)

mod1/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from mixin import MyMixin
2+
3+
4+
class FirstTestCase(MyMixin):
5+
def test_1st(self):
6+
print("test_1st", self)

mod2/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from mod1 import FirstTestCase
2+
3+
4+
class SecondTestCase(FirstTestCase):
5+
def test_2nd(self):
6+
print("test_2nd", self)

test_test.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from mod2 import SecondTestCase
2+
3+
4+
class Test(SecondTestCase):
5+
def test_test(self):
6+
print("test_test", self)

0 commit comments

Comments
 (0)