-
Notifications
You must be signed in to change notification settings - Fork 1
/
1293.patch
37 lines (33 loc) · 1.36 KB
/
1293.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 989e13e0514a97cd01234233dd85ebbd2805a3bb Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Wed, 9 May 2018 15:50:50 -0700
Subject: [PATCH] Skip tests that use 'xprocess' fixture when not installed
There's already a little trick to skip tests that use a fixture
called 'subprocess' when pytest-xprocess is not installed, but
many tests use the 'xprocess' fixture directly, and all of those
will still just fail. This just defines a dummy 'xprocess'
fixture as well as the dummy 'subprocess' fixture when xprocess
is not installed, so those tests as well will be skipped instead
of failing.
I noticed this when trying to run the test suite during build
of the Fedora package - xprocess isn't packaged for Fedora yet,
so there's no way to run the tests that use it unfortunately.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
tests/conftest.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/conftest.py b/tests/conftest.py
index ce885777a..f4611d9d0 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -29,6 +29,10 @@
@pytest.fixture(scope='session')
def subprocess():
pytest.skip('pytest-xprocess not installed.')
+
+ @pytest.fixture(scope='session')
+ def xprocess():
+ pytest.skip('pytest-xprocess not installed.')
else:
@pytest.fixture(scope='session')
def subprocess(xprocess):