Skip to content

Switch to pytest

Paul Erhart requested to merge switch-to-pytest into master

Description

The pytest framework has various advantages over the unittest framework, most notably it is simpler to write tests. pytest can be run on unittest tests. This MR replaces the use of unittest in the CI with `pytest.

Key changes

  • switched from unittest to pytest
  • adapted the integration tests for pytest
  • updated unit test for structure container to avoid warnings from ase (calls of deprecated method Atoms.set_calculator)
  • removed plot_ecis from ClusterExpansion (no more direct matplotlib calls; still used in some doctests)
  • removed outdated tests (test_*__.py)
  • removed structures_for_testing.db database
  • moved pypi job to separate stage
  • separated out tests that cause problems with coverage
  • added JUnit reporting, see here for an example
Edited by Paul Erhart

Merge request reports