Skip to content

Switch to pytest #112

@Flamefire

Description

@Flamefire

I'd suggest using pytest for testing. It is much easier to use and offers plugins which can be e.g. used for coverage analysis.

Examples:

  • no more if __name__ == '__main__': unittest.main(), just name functions test_*
  • self.assertEqual -> assert foo==bar
  • pytest --cov=coverageFolder --cov-fail-under=90

Note that it does not require to rewrite all tests at once, pytest works with unittest tests. But for new tests the easier syntax can be used.

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