unioslo / zabbix-auto-config

MIT License
3 stars 6 forks source link

Rewrite Tests as Pytest Tests #45

Closed pederhan closed 2 years ago

pederhan commented 2 years ago

This pull request rewrites all unittest.TestCase tests as pytest tests and uses pytest as the test runner in CI.

Changes

Reason

The existing tests already use pytest functionality such as pytest.raises. Furthermore, the other Zabbix project, zabbix-cli, already runs its tests via pytest instead of unittest. Since pytest is already used to some degree in this project, it would probably be beneficial to more fully embrace pytest-style testing.

Using pytest with pytest-style tests allows tests to use useful features such as parametrization and fixtures going forward (see pytest documentation for more information).

Going Forward

This is a pretty big change, and I understand if it's not something you want to prioritize right now. 👍

mbakke commented 2 years ago

By the way, is your GPG public key available somewhere?

pederhan commented 2 years ago

By the way, is your GPG public key available somewhere?

I've made it available on https://keys.openpgp.org/. If there is another place you would rather have it hosted, let me know.

mbakke commented 2 years ago

By the way, is your GPG public key available somewhere?

I've made it available on https://keys.openpgp.org/. If there is another place you would rather have it hosted, let me know.

Thanks, found it! I forgot that I could check https://github.com/pederhan.gpg , which has the same key :)