|
4 | 4 | from .utils import run_command_in_container
|
5 | 5 |
|
6 | 6 |
|
| 7 | +@pytest.mark.image_70 |
| 8 | +@pytest.mark.parametrize( |
| 9 | + 'command,expected_output', |
| 10 | + [ |
| 11 | + # python |
| 12 | + ('python2 --version', 'Python 2.7.18'), |
| 13 | + ('python3.5 --version', 'Python 3.5.10'), |
| 14 | + ('python3.6 --version', 'Python 3.6.12'), |
| 15 | + ('python3.7 --version', 'Python 3.7.9'), |
| 16 | + ('python3.8 --version', 'Python 3.8.6'), |
| 17 | + ('pypy3.5 --version', 'Python 3.5.3 (928a4f70d3de7d17449456946154c5da6e600162, Feb 09 2019, 11:50:43)\n[PyPy 7.0.0 with GCC 8.2.0]'), |
| 18 | + # pip |
| 19 | + ('python2 -m pip --version', "pip 20.0.2 from /home/docs/.pyenv/versions/2.7.18/lib/python3.5/site-packages/pip (python 3.5)"), |
| 20 | + ('python3.5 -m pip --version', "pip 20.0.2 from /home/docs/.pyenv/versions/3.5.10/lib/python3.5/site-packages/pip (python 3.5)"), |
| 21 | + ('python3.6 -m pip --version', "pip 20.0.2 from /home/docs/.pyenv/versions/3.6.12/lib/python3.6/site-packages/pip (python 3.6)"), |
| 22 | + ('python3.7 -m pip --version', "pip 20.0.2 from /home/docs/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pip (python 3.7)"), |
| 23 | + ('python3.8 -m pip --version', "pip 20.0.2 from /home/docs/.pyenv/versions/3.8.6/lib/python3.8/site-packages/pip (python 3.8)"), |
| 24 | + # setuptools |
| 25 | + ('python2 -c "import setuptools; print(setuptools.__version__)"', "44.0.0"), |
| 26 | + ('python3.5 -c "import setuptools; print(setuptools.__version__)"', "45.2.0"), |
| 27 | + ('python3.6 -c "import setuptools; print(setuptools.__version__)"', "45.2.0"), |
| 28 | + ('python3.7 -c "import setuptools; print(setuptools.__version__)"', "45.2.0"), |
| 29 | + ('python3.8 -c "import setuptools; print(setuptools.__version__)"', "45.2.0"), |
| 30 | + # virtualenv |
| 31 | + ('python2 -m virtualenv --version', 'virtualenv 20.0.7 from /home/docs/.pyenv/versions/3.7.16/lib/python2.7/site-packages/virtualenv/__init__.pyc'), |
| 32 | + ('python3.5 -m virtualenv --version', 'virtualenv 20.0.7 from /home/docs/.pyenv/versions/3.5.10/lib/python3.5/site-packages/virtualenv/__init__.pyc'), |
| 33 | + ('python3.6 -m virtualenv --version', 'virtualenv 20.0.7 from /home/docs/.pyenv/versions/3.6.12/lib/python3.6/site-packages/virtualenv/__init__.pyc'), |
| 34 | + ('python3.7 -m virtualenv --version', 'virtualenv 20.0.7 from /home/docs/.pyenv/versions/3.7.9/lib/python3.7/site-packages/virtualenv/__init__.pyc'), |
| 35 | + ('python3.8 -m virtualenv --version', 'virtualenv 20.0.7 from /home/docs/.pyenv/versions/3.8.6/lib/python3.8/site-packages/virtualenv/__init__.pyc'), |
| 36 | + # others |
| 37 | + ('node --version', 'v8.10.0'), |
| 38 | + ('npm --version', '3.5.2'), |
| 39 | + ('conda --version', 'conda 4.6.14'), |
| 40 | + ] |
| 41 | +) |
| 42 | +def test_command_versions_image_70(command, expected_output): |
| 43 | + cmd_output = run_command_in_container('readthedocs/build:7.0', command) |
| 44 | + assert cmd_output == expected_output |
| 45 | + |
| 46 | + |
7 | 47 | @pytest.mark.image_60
|
8 | 48 | @pytest.mark.parametrize(
|
9 | 49 | 'command,expected_output',
|
10 | 50 | [
|
11 |
| - # TODO: add other Docker images as well |
12 | 51 | # python
|
13 | 52 | ('python2 --version', 'Python 2.7.18'),
|
14 | 53 | ('python3.5 --version', 'Python 3.5.10'),
|
|
17 | 56 | ('python3.8 --version', 'Python 3.8.6'),
|
18 | 57 | ('pypy3.5 --version', 'Python 3.5.3 (928a4f70d3de7d17449456946154c5da6e600162, Feb 09 2019, 11:50:43)\n[PyPy 7.0.0 with GCC 8.2.0]'),
|
19 | 58 | # pip
|
| 59 | + ('python2 -m pip --version', "pip 20.0.1 from /home/docs/.pyenv/versions/2.7.18/lib/python3.5/site-packages/pip (python 3.5)"), |
20 | 60 | ('python3.5 -m pip --version', "pip 20.0.1 from /home/docs/.pyenv/versions/3.5.10/lib/python3.5/site-packages/pip (python 3.5)"),
|
21 | 61 | ('python3.6 -m pip --version', "pip 20.0.1 from /home/docs/.pyenv/versions/3.6.12/lib/python3.6/site-packages/pip (python 3.6)"),
|
22 | 62 | ('python3.7 -m pip --version', "pip 20.0.1 from /home/docs/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pip (python 3.7)"),
|
|
42 | 82 | def test_command_versions_image_60(command, expected_output):
|
43 | 83 | cmd_output = run_command_in_container('readthedocs/build:6.0', command)
|
44 | 84 | assert cmd_output == expected_output
|
| 85 | + |
| 86 | + |
| 87 | +@pytest.mark.image_50 |
| 88 | +@pytest.mark.parametrize( |
| 89 | + 'command,expected_output', |
| 90 | + [ |
| 91 | + # python |
| 92 | + ('python2 --version', 'Python 2.7.18'), |
| 93 | + ('python3.6 --version', 'Python 3.6.12'), |
| 94 | + ('python3.7 --version', 'Python 3.7.9'), |
| 95 | + ('pypy3.5 --version', 'Python 3.5.3 (928a4f70d3de7d17449456946154c5da6e600162, Feb 09 2019, 11:50:43)\n[PyPy 7.0.0 with GCC 8.2.0]'), |
| 96 | + # pip |
| 97 | + ('python2 -m pip --version', "pip 19.1.1 from /home/docs/.pyenv/versions/2.7.18/lib/python2.7/site-packages/pip (python 2.7)"), |
| 98 | + ('python3.6 -m pip --version', "pip 19.1.1 from /home/docs/.pyenv/versions/3.6.12/lib/python3.6/site-packages/pip (python 3.6)"), |
| 99 | + ('python3.7 -m pip --version', "pip 19.1.1 from /home/docs/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pip (python 3.7)"), |
| 100 | + # setuptools |
| 101 | + ('python2 -c "import setuptools; print(setuptools.__version__)"', "41.0.1"), |
| 102 | + ('python3.6 -c "import setuptools; print(setuptools.__version__)"', "41.0.1"), |
| 103 | + ('python3.7 -c "import setuptools; print(setuptools.__version__)"', "41.0.1"), |
| 104 | + # virtualenv |
| 105 | + ('python2 -m virtualenv --version', '16.6.0'), |
| 106 | + ('python3.6 -m virtualenv --version', '16.6.0'), |
| 107 | + ('python3.7 -m virtualenv --version', '16.6.0'), |
| 108 | + # others |
| 109 | + ('node --version', 'v8.10.0'), |
| 110 | + ('npm --version', '3.5.2'), |
| 111 | + ('conda --version', 'conda 4.6.14'), |
| 112 | + ] |
| 113 | +) |
| 114 | +def test_command_versions_image_50(command, expected_output): |
| 115 | + cmd_output = run_command_in_container('readthedocs/build:5.0', command) |
| 116 | + assert cmd_output == expected_output |
0 commit comments