forked from pool/python-pytest-server-fixtures
* Drop support for Python 2 and <3.6, removing compatibility code.
* Use stdlib unittest.mock instead of mock package.
* Removed usage of path.py and path in favour of pathlib.
* BREAKING CHANGE: Removed RethinkDB support, as the mirror was no longer
available.
* Allowed passing through HTTP headers to the server.
* Fixed threading log debug messages.
* Removed usage of deprecated Thread.setDaemon.
* Explicitly close initial Mongo client.
* Don't use context manager for CREATE DATABASE
- Drop patches, included upstream:
* pytest-plugins-pr186-fix-psycopg29.patch
* remove-mock.patch
- Refreshed remove-six-and-future.patch
- Add patch fix-httpd-fixture-path.patch:
* Attempt to run httpd with the correct config file
- Add patch support-64-bit-pids-xvfb.patch:
* Support 64 bit PIDs when running Xvfb
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-server-fixtures?expand=0&rev=20
17 lines
811 B
Diff
17 lines
811 B
Diff
Index: pytest-server-fixtures-1.8.0/pytest_server_fixtures/xvfb.py
|
|
===================================================================
|
|
--- pytest-server-fixtures-1.8.0.orig/pytest_server_fixtures/xvfb.py
|
|
+++ pytest-server-fixtures-1.8.0/pytest_server_fixtures/xvfb.py
|
|
@@ -43,7 +43,10 @@ class XvfbServer(object):
|
|
|
|
def __init__(self):
|
|
tmpdir = mkdtemp(prefix='XvfbServer.', dir=Workspace.get_base_tempdir())
|
|
- for servernum in range(os.getpid(), 65536):
|
|
+ pid_max = 65536
|
|
+ with open('/proc/sys/kernel/pid_max') as pid_max_file:
|
|
+ pid_max = int(pid_max_file.read())
|
|
+ for servernum in range(os.getpid(), pid_max):
|
|
if os.path.exists('/tmp/.X{0}-lock'.format(servernum)):
|
|
continue
|
|
self.display = ':' + str(servernum)
|