Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6b0c13

Browse files
committed
Create an actual environment for python healthy() types test
1 parent fe10811 commit f6b0c13

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/languages/python_test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ def test_find_by_sys_executable(exe, realpath, expected):
5454

5555
def test_healthy_types_py_in_cwd(tmpdir):
5656
with tmpdir.as_cwd():
57+
prefix = tmpdir.join('prefix').ensure_dir()
58+
prefix.join('setup.py').write('import setuptools; setuptools.setup()')
59+
prefix = Prefix(str(prefix))
60+
python.install_environment(prefix, C.DEFAULT, ())
61+
5762
# even if a `types.py` file exists, should still be healthy
5863
tmpdir.join('types.py').ensure()
59-
# this env doesn't actually exist (for test speed purposes)
60-
assert python.healthy(Prefix(str(tmpdir)), C.DEFAULT) is True
64+
assert python.healthy(prefix, C.DEFAULT) is True

0 commit comments

Comments
 (0)