pnkraemer / tueplots

Figure sizes, font sizes, fonts, and more configurations at minimal overhead. Fix your journal papers, conference proceedings, and other scientific publications.
https://tueplots.readthedocs.io
MIT License
676 stars 25 forks source link

Test improvements #58

Closed pnkraemer closed 2 years ago

pnkraemer commented 2 years ago

This PR refactors the test suite.

The new state is probably best described by the docs in tests/__init__.py:

"""Tests for tueplots.

Essentially, there are only two kinds of tests.

    1) The return types of anything in tueplots' main module should be a dictionary
       that is compatible with plt.rcParams.update()-style functions.
    2) The return types of anything in tueplots.constants should be a numpy array.

These two tests make up most of the test suite.
"""

The implementation now realises this pattern by writing essentially 3 tests (two of which are very similar). The test-cases are generated by pytest-cases.