Skip to content

Commit 2b886af

Browse files
committed
Removed cherrypy.server from pytest namespace
pytest_namespace was removed in pytest version 4.0. The fixture now points directly to cherrypy.server.
1 parent 0fedbba commit 2b886af

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/conftest.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def __call__(self, env, start_response):
107107

108108
@pytest.fixture(scope="session")
109109
def server():
110-
return pytest.server
110+
return cherrypy.server
111111

112112

113113
@pytest.fixture()
@@ -124,7 +124,7 @@ def get_free_port():
124124
return ip, port
125125

126126

127-
def pytest_namespace():
127+
def pytest_configure(config):
128128
cherrypy.tree.graft(SimpleApp(), "/")
129129

130130
ip, port = get_free_port()
@@ -136,7 +136,6 @@ def pytest_namespace():
136136
logger.removeHandler(logger.handlers[0])
137137

138138
cherrypy.server.start()
139-
return {"server": cherrypy.server}
140139

141140

142141
def pytest_unconfigure(config):

0 commit comments

Comments
 (0)