mirror of
https://github.com/KosinskiLab/AlphaPulldown.git
synced 2026-06-04 14:14:24 +08:00
New. Print doctstrings upon execution
This commit is contained in:
10
test/conftest.py
Executable file
10
test/conftest.py
Executable file
@@ -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))
|
||||
Reference in New Issue
Block a user