Skip to content

use pytest #177

@tardyp

Description

@tardyp

This codebase is using standard python unittest framework

pytest is arguably more advanced and defacto standard for concise unit testing.

  • fixture based testing (tempfile, etc)
  • module function based testing without the need to define class
  • pytest.parametrized is also very useful (to me)

I would propose to include pytest as a dev dependency, so that it is easier to write tests for spdx/tools-python

We can keep the tests as they are right now, we don't need to translate them as pytest also support standard test classes.

I'll do the PR, if maintainers are agreeing to the change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions