1 parent ea273dd commit 139997aCopy full SHA for 139997a
1 file changed
tests/conftest.py
@@ -6,3 +6,23 @@ def disable_macos_customization(monkeypatch):
6
from compilers.common.platform import macos
7
8
monkeypatch.setattr(macos, 'customize_compiler', lambda config_vars: None)
9
+
10
11
+# from pytest-dev/pytest#363
12
+@pytest.fixture(scope="session")
13
+def monkeysession():
14
+ from _pytest.monkeypatch import MonkeyPatch
15
16
+ mpatch = MonkeyPatch()
17
+ yield mpatch
18
+ mpatch.undo()
19
20
21
+@pytest.fixture(scope="module")
22
+def suppress_path_mangle(monkeysession):
23
+ """
24
+ Disable the path mangling in the compiler. Workaround for pypa/distutils#169.
25
26
+ from compilers.C import base
27
28
+ monkeysession.setattr(base.Compiler, '_make_relative', staticmethod(lambda x: x))
0 commit comments