Skip to content

Commit

Permalink
suppress logging when running full single test files
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Jun 20, 2023
1 parent 4d5e551 commit 68e84c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
logging.basicConfig()
if '-v' in sys.argv:
logging.getLogger().setLevel(logging.DEBUG)
elif 'discover' in sys.argv or '-q' in sys.argv or '--quiet' in sys.argv:
else:
# used to be: elif 'discover' in sys.argv or '-q' in sys.argv or '--quiet' in sys.argv:
# dropped that to suppress logging when running full single test files
logging.disable(logging.CRITICAL + 1)

0 comments on commit 68e84c3

Please sign in to comment.