(Create the page with initial Python example) |
(Add FMF example, add link to python-tox) |
||
Line 6: | Line 6: | ||
* https://src.fedoraproject.org/tests/python | * https://src.fedoraproject.org/tests/python | ||
The test repo contains basic smoke test for virtualenv together with example test [https://fedoraproject.org/wiki/CI/Metadata Metadata] stored in the [https://fedoraproject.org/wiki/Flexible_Metadata_Format Flexible Metadata Format]: | |||
* [https://src.fedoraproject.org/tests/python/blob/master/f/main.fmf main.fmf] | |||
* [https://src.fedoraproject.org/tests/python/blob/master/f/smoke/venv.fmf venv.fmf] | |||
Once the test is avaible in the share test repository it can be easily linked from supported Python versions: | Once the test is avaible in the share test repository it can be easily linked from supported Python versions: | ||
Line 23: | Line 28: | ||
* [https://src.fedoraproject.org/rpms/python-setuptools/blob/master/f/tests/tests.yml python-setuptools] | * [https://src.fedoraproject.org/rpms/python-setuptools/blob/master/f/tests/tests.yml python-setuptools] | ||
* [https://src.fedoraproject.org/rpms/python-virtualenv/blob/master/f/tests/tests.yml python-virtualenv] | * [https://src.fedoraproject.org/rpms/python-virtualenv/blob/master/f/tests/tests.yml python-virtualenv] | ||
* [https://src.fedoraproject.org/rpms/python-tox/blob/master/f/tests/tests.yml python-tox] | |||
Note that for the last set of examples we run the same test several times with modified environment. For example: | Note that for the last set of examples we run the same test several times with modified environment. For example: |
Revision as of 14:42, 19 September 2018
On this page you can find some inspiration from real-life examples of tests already enabled in the Fedora CI.
Python
There are multiple versions of Python programming language available in Fedora and a number of related subpackages. As all of them should be tested (including their various combinatios) we share test coverage for them in the tests
namespace:
The test repo contains basic smoke test for virtualenv together with example test Metadata stored in the Flexible Metadata Format:
Once the test is avaible in the share test repository it can be easily linked from supported Python versions:
We test additional Python implementations as well:
Plus we ensure that essential Python tools such as setuptools
, virtualenv
or pip
correctly work with all supported versions:
Note that for the last set of examples we run the same test several times with modified environment. For example:
- smoke36: dir: python/smoke run: VERSION=3.6 ./venv.sh - smoke37: dir: python/smoke run: VERSION=3.7 ./venv.sh - smoke26: dir: python/smoke run: VERSION=2.6 METHOD=virtualenv TOX=false ./venv.sh - smoke27: dir: python/smoke run: VERSION=2.7 METHOD=virtualenv ./venv.sh - smoke34_virtualenv: dir: python/smoke run: VERSION=3.4 METHOD=virtualenv ./venv.sh
In this way we create several virtual test cases from a single test code which prevents duplication and minimizes future maintenance.