Skip to content

[RFC] Laws property-based tests for LogAction #2

@chshersh

Description

@chshersh

It would be really nice to have tests for the logging functionality, especially property-based testing. However, it's not really clear how to test it. It would be really nice though to have property-based tests for laws for every data type. However, in order to do this, we need to implement the following two pieces:

  • Question 1: Some way to generate arbitrary LogAction
  • Question 2: Some way to compare LogAction

Question 1 is still open. For Question 2: instead of comparing LogActions we can compare results of PureLogger.

We have doctest for unit testing, so this should be enough in terms of unit tests (though, more functions always can be covered with doctest). But having property-based tests for laws would be really good.

Any thoughts are appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerstestUnit testing, property testing, doctests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions