port some acceptance tests over to copy_example
This commit is contained in:
4
testing/example_scripts/conftest_usageerror/conftest.py
Normal file
4
testing/example_scripts/conftest_usageerror/conftest.py
Normal file
@@ -0,0 +1,4 @@
|
||||
def pytest_configure(config):
|
||||
import pytest
|
||||
|
||||
raise pytest.UsageError("hello")
|
||||
@@ -0,0 +1,14 @@
|
||||
import pytest
|
||||
|
||||
|
||||
class MyFile(pytest.File):
|
||||
def collect(self):
|
||||
return [MyItem("hello", parent=self)]
|
||||
|
||||
|
||||
def pytest_collect_file(path, parent):
|
||||
return MyFile(path, parent)
|
||||
|
||||
|
||||
class MyItem(pytest.Item):
|
||||
pass
|
||||
@@ -0,0 +1,2 @@
|
||||
def test_hello():
|
||||
pass
|
||||
Reference in New Issue
Block a user