-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update test expectations in py35/py36 tests
`/usr/bin/env python` is no longer the kernel python
- Loading branch information
Showing
4 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
from subprocess import check_output | ||
from subprocess import STDOUT, check_output | ||
|
||
assert sys.version_info[:2] == (3, 5), sys.version | ||
assert sys.version_info[:2] == (3, 7), sys.version | ||
|
||
out = check_output(["micromamba", "--version"]).decode("utf8").strip() | ||
|
||
def sh(cmd, **kwargs): | ||
return check_output(cmd, **kwargs).decode("utf8").strip() | ||
|
||
|
||
kernel_python = os.path.join(os.environ["KERNEL_PYTHON_PREFIX"], "bin", "python") | ||
out = sh([kernel_python, "--version"], stderr=STDOUT) | ||
v = out.split()[1] | ||
assert v[:3] == "3.5", out | ||
|
||
out = sh(["micromamba", "--version"]) | ||
assert out == "1.1.0", out | ||
|
||
out = check_output(["mamba", "--version"]).decode("utf8").strip() | ||
out = sh(["mamba", "--version"]) | ||
assert ( | ||
out | ||
== """mamba 1.1.0 | ||
conda 4.13.0""" | ||
), out | ||
|
||
import numpy | ||
sh([kernel_python, "-c", "import numpy"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#!/usr/bin/env python | ||
#!/srv/conda/envs/kernel/bin/python | ||
import sys | ||
|
||
import pypi_pkg_test | ||
import there | ||
|
||
print(sys.version_info) | ||
assert sys.version_info[:2] == (3, 6) | ||
|
||
import pypi_pkg_test # noqa | ||
import there # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env python3 | ||
#!/srv/conda/envs/kernel/bin/python | ||
import sys | ||
|
||
print(sys.version_info) | ||
|