diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-09-26 19:19:57 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-09-26 19:19:57 +0200 |
| commit | ddd893ea290ad57cf78daae4ea4d5ae0793e64c7 (patch) | |
| tree | aa1decf9ac543e23b1c7a21241e99ee2a6ed4682 /client | |
| parent | 2939307120af1b8729699f649b354ab2e47637ec (diff) | |
| download | jasper-client-ddd893ea290ad57cf78daae4ea4d5ae0793e64c7.tar.gz jasper-client-ddd893ea290ad57cf78daae4ea4d5ae0793e64c7.zip | |
Configure logging and add possibility to view debug messages in test.py
Diffstat (limited to 'client')
| -rw-r--r-- | client/test.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/test.py b/client/test.py index 9bd765d..36e5ef5 100644 --- a/client/test.py +++ b/client/test.py @@ -3,6 +3,7 @@ import os import sys import unittest +import logging import argparse from mock import patch, Mock from urllib2 import URLError, urlopen @@ -234,8 +235,15 @@ if __name__ == '__main__': description='Test suite for the Jasper client code.') parser.add_argument('--light', action='store_true', help='runs a subset of the tests (only requires Python dependencies)') + parser.add_argument('--debug', action='store_true', + help='show debug messages') args = parser.parse_args() + logging.basicConfig() + logger = logging.getLogger() + if args.debug: + logger.setLevel(logging.DEBUG) + # Change CWD to jasperpath.LIB_PATH os.chdir(jasperpath.LIB_PATH) |
