se2p / pynguin

The PYthoN General UnIt Test geNerator is a test-generation tool for Python
https://www.pynguin.eu
MIT License
1.22k stars 74 forks source link

AssertionError when using LINE Coverage #32

Closed JoaoMaio closed 1 year ago

JoaoMaio commented 1 year ago

I copied "queue_example.py" from the quickstart guide on https://pynguin.readthedocs.io/en/stable/user/quickstart.html.

When i try to get the coverage report "LINE i get the error:

image

Commands used: pynguin --project-path ../Badge5 --output-path ./tmp/pynguin-results --module-name main -v --create-coverage-report True --seed 1629381673714481067 --coverage_metrics LINE

pynguin --project-path ../Badge5 --output-path ./tmp/pynguin-results --module-name main -v --create-coverage-report True --seed 1629381673714481067 --coverage_metrics BRANCH LINE

I just followed the guide. What am I doing wrong?

Wooza commented 1 year ago

Sorry for the inconvenience. The default algorithm (DynaMOSA) only works with branch coverage as of now. Choosing a different algorithm, e.g., --algorithm MOSA, should work.

JoaoMaio commented 1 year ago

Thank you for your fast response and thank you for the help. MOSA did work