Skip to content

Commit

Permalink
New. Print doctstrings upon execution
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaMolod committed Oct 24, 2023
1 parent dba0f4c commit 457aa43
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pytest

@pytest.mark.tryfirst
def pytest_itemcollected(item):
par = item.parent.obj
node = item.obj
pref = par.__doc__.strip() if par.__doc__ else par.__class__.__name__
suf = node.__doc__.strip() if node.__doc__ else node.__name__
if pref or suf:
item._nodeid = ' '.join((pref, suf))

0 comments on commit 457aa43

Please sign in to comment.