From 17c1050f26d6b1693e9731253d8f297aed99fee5 Mon Sep 17 00:00:00 2001 From: Taseer Ahmed Date: Sat, 4 Mar 2017 12:52:50 +0500 Subject: Implement debug option Show traceback only when debug flag specified. JIRA: QTIP-201 Change-Id: I9cc4b4ed5a2cb2d2efabd9c0eb3aac216321ebac Signed-off-by: Taseer Ahmed --- tests/unit/cli/options_test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/unit/cli/options_test.py b/tests/unit/cli/options_test.py index f9472814..9dbbe6f3 100644 --- a/tests/unit/cli/options_test.py +++ b/tests/unit/cli/options_test.py @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2016 ZTE Corp and others. +# Copyright (c) 2017 taseer94@gmail.com and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 @@ -8,8 +8,9 @@ ############################################################################## import pytest -from click.testing import CliRunner +import sys +from click.testing import CliRunner from qtip.cli.entry import cli @@ -28,5 +29,5 @@ class TestClass(object): assert 'dev' in result.output def test_debug(self, runner): - result = runner.invoke(cli, ['-d']) - assert '' in result.output + runner.invoke(cli, ['-d']) + assert sys.tracebacklimit == 8 -- cgit 1.2.3-korg