[unittest] add --debug option handling
This commit is contained in:
@@ -173,4 +173,8 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if "--debug" in sys.argv:
|
||||
sys.argv.remove("--debug")
|
||||
from entropy.const import etpUi
|
||||
etpUi['debug'] = True
|
||||
unittest.main()
|
||||
|
||||
@@ -352,4 +352,8 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
self.assertEqual(db_lic_txt, lic_txt)
|
||||
|
||||
if __name__ == '__main__':
|
||||
if "--debug" in sys.argv:
|
||||
sys.argv.remove("--debug")
|
||||
from entropy.const import etpUi
|
||||
etpUi['debug'] = True
|
||||
unittest.main()
|
||||
|
||||
@@ -31,4 +31,8 @@ class QATest(unittest.TestCase):
|
||||
self.assert_(self.QA.entropy_package_checks(pkg))
|
||||
|
||||
if __name__ == '__main__':
|
||||
if "--debug" in sys.argv:
|
||||
sys.argv.remove("--debug")
|
||||
from entropy.const import etpUi
|
||||
etpUi['debug'] = True
|
||||
unittest.main()
|
||||
|
||||
@@ -12,8 +12,12 @@ sys.path.insert(0,'../../client')
|
||||
sys.path.insert(0,'.')
|
||||
sys.path.insert(0,'../')
|
||||
# set unit testing mode
|
||||
from entropy.const import etpSys
|
||||
from entropy.const import etpSys, etpUi
|
||||
etpSys['unittest'] = True
|
||||
if "--debug" in sys.argv:
|
||||
sys.argv.remove("--debug")
|
||||
etpUi['debug'] = True
|
||||
|
||||
from tests import db, client, server, misc, transceivers, tools, i18n, spm, qa
|
||||
rc = 0
|
||||
|
||||
|
||||
@@ -54,4 +54,8 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
self.assertNotEqual(None, dbconn.retrieveAtom(1))
|
||||
|
||||
if __name__ == '__main__':
|
||||
if "--debug" in sys.argv:
|
||||
sys.argv.remove("--debug")
|
||||
from entropy.const import etpUi
|
||||
etpUi['debug'] = True
|
||||
unittest.main()
|
||||
|
||||
@@ -138,4 +138,8 @@ class SpmTest(unittest.TestCase):
|
||||
shutil.rmtree(tmp_path, True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
if "--debug" in sys.argv:
|
||||
sys.argv.remove("--debug")
|
||||
from entropy.const import etpUi
|
||||
etpUi['debug'] = True
|
||||
unittest.main()
|
||||
|
||||
@@ -768,4 +768,8 @@ class ToolsTest(unittest.TestCase):
|
||||
shutil.rmtree(tmp_dir)
|
||||
|
||||
if __name__ == '__main__':
|
||||
if "--debug" in sys.argv:
|
||||
sys.argv.remove("--debug")
|
||||
from entropy.const import etpUi
|
||||
etpUi['debug'] = True
|
||||
unittest.main()
|
||||
|
||||
@@ -54,4 +54,8 @@ class TransceiversTest(unittest.TestCase):
|
||||
os.remove(path_to_save)
|
||||
|
||||
if __name__ == '__main__':
|
||||
if "--debug" in sys.argv:
|
||||
sys.argv.remove("--debug")
|
||||
from entropy.const import etpUi
|
||||
etpUi['debug'] = True
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user