From: Frank Brehm Date: Mon, 6 Feb 2023 09:55:33 +0000 (+0100) Subject: Extending tests in test/test_05_base_app.py X-Git-Tag: 0.3.0~2^2~82 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=24b3cabc46ed25f2dbae468b5cdd912d4cc5e9c7;p=pixelpark%2Fpuppet-tools.git Extending tests in test/test_05_base_app.py --- diff --git a/test/test_05_base_app.py b/test/test_05_base_app.py index dc7cc08..3335a90 100755 --- a/test/test_05_base_app.py +++ b/test/test_05_base_app.py @@ -39,6 +39,29 @@ class TestBaseApp(DpxPuppetToolsTestcase): LOG.debug( "Version of dpx_puppettools.app: " + dpx_puppettools.app.__version__) + # ------------------------------------------------------------------------- + def test_init(self): + + LOG.info("Testing init of a BaseDPXPuppetApplication object ...") + from dpx_puppettools.app import BaseDPXPuppetApplication + + quiet = False + if not self.verbose: + quiet = True + + app = BaseDPXPuppetApplication( + appname=self.appname, verbose=self.verbose) + app.quiet = quiet + + LOG.debug("Drawing lines ...") + app.empty_line() + app.line(linechar='#', color='CYAN') + app.line(width=20) + + LOG.debug("BaseDPXPuppetApplication %%r: %r", app) + app.empty_line() + LOG.debug("BaseDPXPuppetApplication %%s: %s", str(app)) + # ============================================================================= if __name__ == '__main__': @@ -53,6 +76,7 @@ if __name__ == '__main__': suite = unittest.TestSuite() suite.addTest(TestBaseApp('test_import', verbose)) + suite.addTest(TestBaseApp('test_init', verbose)) runner = unittest.TextTestRunner(verbosity=verbose)