question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

green -vv does not print test docstrings

See original GitHub issue

I just installed green 2.16.1, and green -vv doesn’t print test method docstrings. For instance, with test_foo.py from the readme, the output for green -vv is this:

test_foo
  TestAnswer
.   test_expected
.   test_type
  TestSchool
.   test_age
.   test_food

If I set the verbosity level to 3 with green -vvv, it does print the docstrings.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
CleanCutcommented, Sep 1, 2019

Fixed. Updated the screenshots as well, for good measure.

1reaction
CleanCutcommented, Aug 28, 2019

Correct, that is the design of the verbosity levels:

verbosity=1 (default)

  • dots

verbosity=2 (-vv)

  • Class & method names

verbosity=3 (-vvv)

  • Version information
  • Class names
  • Method docstrings

Perhaps we need to make that explicit in the help output?

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - How to print docstring for class attribute/element?
How can I print the docstring for Hotel which is a Class attribute/element? What I've tried. print(Holiday.Hotel.__doc__). returns ...
Read more >
doctest – Testing through documentation - PyMOTW
doctest lets you test your code by running examples embedded in the documentation and verifying that they produce the expected results.
Read more >
Source code for test_py_module.test
It's common for programmers to give a code example inside of their docstring:: from test_py_module import Foo myclass = Foo() myclass.dothismethod('with this ...
Read more >
doctest — Test interactive Python examples — Python 3.11.1 ...
There's no output! That's normal, and it means all the examples worked. Pass -v to the script, and doctest prints a detailed log...
Read more >
[LONG] docstring-driven testing
and the final line of output is "Test failed.". Run it with the -v switch instead: python M.py -v. and a detailed report...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found