| |
@@ -1,57 +0,0 @@
|
| |
- diff --git a/tests/conftest.py b/tests/conftest.py
|
| |
- index 28b80cc..05aac92 100644
|
| |
- --- a/tests/conftest.py
|
| |
- +++ b/tests/conftest.py
|
| |
- @@ -5,7 +5,10 @@ import socket
|
| |
-
|
| |
- import pytest
|
| |
-
|
| |
- -import cherrypy
|
| |
- +try:
|
| |
- + import cherrypy
|
| |
- +except ImportError:
|
| |
- + cherrypy = None
|
| |
-
|
| |
-
|
| |
- class SimpleApp(object):
|
| |
- @@ -108,7 +111,10 @@ class SimpleApp(object):
|
| |
-
|
| |
- @pytest.fixture(scope="session")
|
| |
- def server():
|
| |
- - return cherrypy.server
|
| |
- + try:
|
| |
- + return cherrypy.server
|
| |
- + except AttributeError:
|
| |
- + pytest.skip("cherrypy not available")
|
| |
-
|
| |
-
|
| |
- @pytest.fixture()
|
| |
- @@ -126,17 +132,20 @@ def get_free_port():
|
| |
-
|
| |
-
|
| |
- def pytest_configure(config):
|
| |
- - cherrypy.tree.graft(SimpleApp(), "/")
|
| |
- -
|
| |
- - ip, port = get_free_port()
|
| |
- + try:
|
| |
- + cherrypy.tree.graft(SimpleApp(), "/")
|
| |
- + except AttributeError:
|
| |
- + pass
|
| |
- + else:
|
| |
- + ip, port = get_free_port()
|
| |
-
|
| |
- - cherrypy.config.update({"server.socket_host": ip, "server.socket_port": port})
|
| |
- + cherrypy.config.update({"server.socket_host": ip, "server.socket_port": port})
|
| |
-
|
| |
- - # turn off logging
|
| |
- - logger = cherrypy.log.access_log
|
| |
- - logger.removeHandler(logger.handlers[0])
|
| |
- + # turn off logging
|
| |
- + logger = cherrypy.log.access_log
|
| |
- + logger.removeHandler(logger.handlers[0])
|
| |
-
|
| |
- - cherrypy.server.start()
|
| |
- + cherrypy.server.start()
|
| |
-
|
| |
-
|
| |
- def pytest_unconfigure(config):
|
| |
This reverts commit f7471b1.
Bumping the release, so the dependency is shown in repoqueries and for Koschei.