start reorganizing docs, write more docs, shift plugin docs, to proper documentation,
use sphinx, remove old docs ... work in progress. --HG-- branch : trunk
This commit is contained in:
16
example/funcarg/costlysetup/conftest.py
Normal file
16
example/funcarg/costlysetup/conftest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
def pytest_funcarg__setup(request):
|
||||
return request.cached_setup(
|
||||
setup=lambda: CostlySetup(),
|
||||
teardown=lambda costlysetup: costlysetup.finalize(),
|
||||
scope="session",
|
||||
)
|
||||
|
||||
class CostlySetup:
|
||||
def __init__(self):
|
||||
import time
|
||||
time.sleep(5)
|
||||
self.timecostly = 1
|
||||
|
||||
def finalize(self):
|
||||
del self.timecostly
|
||||
1
example/funcarg/costlysetup/sub1/__init__.py
Normal file
1
example/funcarg/costlysetup/sub1/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
#
|
||||
3
example/funcarg/costlysetup/sub1/test_quick.py
Normal file
3
example/funcarg/costlysetup/sub1/test_quick.py
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
def test_quick():
|
||||
pass
|
||||
1
example/funcarg/costlysetup/sub2/__init__.py
Normal file
1
example/funcarg/costlysetup/sub2/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
#
|
||||
6
example/funcarg/costlysetup/sub2/test_two.py
Normal file
6
example/funcarg/costlysetup/sub2/test_two.py
Normal file
@@ -0,0 +1,6 @@
|
||||
def test_something(setup):
|
||||
assert setup.timecostly == 1
|
||||
|
||||
def test_something_more(setup):
|
||||
assert setup.timecostly == 1
|
||||
|
||||
Reference in New Issue
Block a user