Skip to content

Commit d05cf79

Browse files
committed
TST: drop workaround for Cython bug fixed in version 0.29.34
1 parent e5b2e15 commit d05cf79

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

tests/conftest.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
# SPDX-License-Identifier: MIT
44

5-
import atexit
65
import contextlib
76
import os
87
import os.path
@@ -75,24 +74,6 @@ def tmp_path_session(tmp_path_factory):
7574
))
7675

7776

78-
@pytest.fixture
79-
def tmp_build_path():
80-
# Similar to the tmp_path fixture but ensures that the temporary
81-
# directory is on the same Windows drive as the test packages
82-
# source directory. This is required to work around a Cython bug
83-
# exposed in our test packages. See https://github.com/cython/cython/pull/5279
84-
tmpdir = tempfile.mkdtemp(prefix='.build-', dir=package_dir)
85-
# The clenup is implemented with an atexit hook rather than with a
86-
# regular context manager because we import extension modules from
87-
# the build directory in the tests and these need to stay around
88-
# till the Python interpreter is being teared down. Orherwise
89-
# PermissionError removing the folder are obtained on Windows, but
90-
# more importantly, the removal succeeds on Cygwin but memory
91-
# mapping errors are obtained when Python tries to fork().
92-
atexit.register(shutil.rmtree, tmpdir, ignore_errors=True)
93-
yield pathlib.Path(tmpdir)
94-
95-
9677
class VEnv(EnvBuilder):
9778
def __init__(self, env_dir):
9879
super().__init__(with_pip=True)

tests/test_editable.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ def test_collect(package_complex):
5858
assert tree['complex']['more']['__init__.py'] == os.path.join(root, 'complex', 'more', '__init__.py')
5959

6060

61-
def test_mesonpy_meta_finder(package_complex, tmp_build_path):
61+
def test_mesonpy_meta_finder(package_complex, tmp_path):
6262
# build a package in a temporary directory
63-
mesonpy.Project(package_complex, tmp_build_path)
64-
build_path = tmp_build_path / 'build'
63+
mesonpy.Project(package_complex, tmp_path)
64+
build_path = tmp_path / 'build'
6565

6666
# point the meta finder to the build directory
6767
finder = _editable.MesonpyMetaFinder({'complex'}, os.fspath(build_path), ['ninja'])

0 commit comments

Comments
 (0)