Skip to content

Commit 5f6d767

Browse files
committed
update test expectations in py35/py36 tests
`/usr/bin/env python` is no longer the kernel python
1 parent 0f328e6 commit 5f6d767

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

tests/conda/py35-binder-dir/verify

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
11
#!/usr/bin/env python
2+
import os
23
import sys
3-
from subprocess import check_output
4+
from subprocess import STDOUT, check_output
45

5-
assert sys.version_info[:2] == (3, 5), sys.version
6+
assert sys.version_info[:2] == (3, 7), sys.version
67

7-
out = check_output(["micromamba", "--version"]).decode("utf8").strip()
8+
9+
def sh(cmd, **kwargs):
10+
return check_output(cmd, **kwargs).decode("utf8").strip()
11+
12+
13+
kernel_python = os.path.join(os.environ["KERNEL_PYTHON_PREFIX"], "bin", "python")
14+
out = sh([kernel_python, "--version"], stderr=STDOUT)
15+
v = out.split()[1]
16+
assert v[:3] == "3.5", out
17+
18+
out = sh(["micromamba", "--version"])
819
assert out == "1.1.0", out
920

10-
out = check_output(["mamba", "--version"]).decode("utf8").strip()
21+
out = sh(["mamba", "--version"])
1122
assert (
1223
out
1324
== """mamba 1.1.0
1425
conda 4.13.0"""
1526
), out
1627

17-
import numpy
28+
sh([kernel_python, "-c", "import numpy"])

tests/external/reproductions.repos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# Zenodo record of https://github.com/binder-examples/requirements
3434
- name: 10.5281/zenodo.3242074
3535
url: 10.5281/zenodo.3242074
36-
verify: python -c 'import matplotlib'
36+
verify: /srv/conda/envs/kernel/bin/python -c 'import matplotlib'
3737
# Test that files in git-lfs are properly cloned
3838
- name: LFS
3939
url: https://github.com/binderhub-ci-repos/lfs

tests/pipfile/py36/verify

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!/usr/bin/env python
1+
#!/srv/conda/envs/kernel/bin/python
22
import sys
33

4-
import pypi_pkg_test
5-
import there
6-
74
print(sys.version_info)
85
assert sys.version_info[:2] == (3, 6)
6+
7+
import pypi_pkg_test # noqa
8+
import there # noqa

tests/venv/py35/verify

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3
1+
#!/srv/conda/envs/kernel/bin/python
22
import sys
33

44
print(sys.version_info)

0 commit comments

Comments
 (0)