Closed phiwuu closed 6 months ago
Are you using the --activity
flag for lobster-python to get the tests?
And are you making sure that lobster-python is run twice, once for the code (making sure that the tests are not accidentally passed) and once with --activity
for the tests?
So if you have a dir structure like this:
my_module
tests
Then you should run it like so:
$ lobster-python my_module --out=code.lobster
$ lobster-python --activity tests --out=test.lobster
I see. Then it was indeed my mistake. I ran lobster-python
over the tests folder, too, without the `--activity' flag, and was expecting that it ignores the tests. I will update the readme file accordingly.
Right - so if you run without --activity
then any test just looks like some random class extension, there is no real way for the tool to tell.
I'll kill the ticket now since I hope this is resolved?
If
lobster-python
runs over a Python project whereunittest
is used instead ofpytest
, then each test is also interpreted as a regular function. This leads to the result that the final lobster report shows each unit test twice (as a function and as a test).We need to check if this happens only for
unittest
, or also forpytest
.