File tree Expand file tree Collapse file tree 4 files changed +22
-11
lines changed Expand file tree Collapse file tree 4 files changed +22
-11
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
+ import os
2
3
import sys
3
- from subprocess import check_output
4
+ from subprocess import STDOUT , check_output
4
5
5
- assert sys .version_info [:2 ] == (3 , 5 ), sys .version
6
+ assert sys .version_info [:2 ] == (3 , 7 ), sys .version
6
7
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" ])
8
19
assert out == "1.1.0" , out
9
20
10
- out = check_output (["mamba" , "--version" ]). decode ( "utf8" ). strip ( )
21
+ out = sh (["mamba" , "--version" ])
11
22
assert (
12
23
out
13
24
== """mamba 1.1.0
14
25
conda 4.13.0"""
15
26
), out
16
27
17
- import numpy
28
+ sh ([ kernel_python , "-c" , " import numpy" ])
Original file line number Diff line number Diff line change 33
33
# Zenodo record of https://github.com/binder-examples/requirements
34
34
- name : 10.5281/zenodo.3242074
35
35
url : 10.5281/zenodo.3242074
36
- verify : python -c 'import matplotlib'
36
+ verify : /srv/conda/envs/kernel/bin/ python -c 'import matplotlib'
37
37
# Test that files in git-lfs are properly cloned
38
38
- name : LFS
39
39
url : https://github.com/binderhub-ci-repos/lfs
Original file line number Diff line number Diff line change 1
- #!/usr/ bin/env python
1
+ #!/srv/conda/envs/kernel/ bin/python
2
2
import sys
3
3
4
- import pypi_pkg_test
5
- import there
6
-
7
4
print (sys .version_info )
8
5
assert sys .version_info [:2 ] == (3 , 6 )
6
+
7
+ import pypi_pkg_test # noqa
8
+ import there # noqa
Original file line number Diff line number Diff line change 1
- #!/usr/ bin/env python3
1
+ #!/srv/conda/envs/kernel/ bin/python
2
2
import sys
3
3
4
4
print (sys .version_info )
You can’t perform that action at this time.
0 commit comments