Commit 7cf7154a authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Use PyTest instead of xmlrunner to discover Python tests with Ubuntu CI.

parent 8d1450e1
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -44,7 +44,8 @@ test:ubuntu_python:
  before_script:
    - !reference [.retrieve_deps:apt, script]
    - source venv/bin/activate
    - python -m pip install unittest-xml-reporting pytest
    # - python -m pip install unittest-xml-reporting pytest
    - python -m pip install pytest
    - which python
    - python -m pip list
    - >
@@ -55,7 +56,8 @@ test:ubuntu_python:
    - cd ${CI_PROJECT_NAME}
    # Run on discovery all tests located in project/unit_tests/python and discard the stdout
    # only to show the errors/warnings and the results of the tests
    - python -m xmlrunner discover -s unit_tests/ -v -b --output-file xmlrunner-results.xml
    # - python -m xmlrunner discover -s unit_tests/ -v -b --output-file xmlrunner-results.xml
    - pytest unit_tests/ -v --junitxml=xmlrunner-results.xml

  artifacts:
    reports: