]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Fixing setup.py and test/test_01_config.py because of changing lib dir.
authorFrank Brehm <frank.brehm@pixelpark.com>
Fri, 24 May 2024 09:12:02 +0000 (11:12 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Fri, 24 May 2024 09:12:02 +0000 (11:12 +0200)
setup.py
test/test_01_config.py

index 94896c439faa824fc705bf5dce55119b4a394289..7384d15b19659e3301baa1268106f1508e4408f3 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@ from setuptools import setup
 __base_dir__ = os.path.abspath(os.path.dirname(__file__))
 __bin_dir__ = os.path.join(__base_dir__, 'bin')
 __lib_dir__ = os.path.join(__base_dir__, 'lib')
-__module_dir__ = os.path.join(__lib_dir__, 'cr_tf')
+__module_dir__ = os.path.join(__lib_dir__, 'create_terraform')
 __init_py__ = os.path.join(__module_dir__, '__init__.py')
 __postinst_scriptdir__ = pathlib.Path(__base_dir__) / 'postinstall-scripts'
 __keys_dir__ = pathlib.Path(__base_dir__) / 'keys'
@@ -49,11 +49,11 @@ def pp(obj):
 if os.path.exists(__module_dir__) and os.path.isfile(__init_py__):
     sys.path.insert(0, os.path.abspath(__lib_dir__))
 
-import cr_tf
+import create_terraform
 
 ENCODING = "utf-8"
 
-__packet_version__ = cr_tf.__version__
+__packet_version__ = create_terraform.__version__
 
 __packet_name__ = 'create_terraform'
 
index bd8d58ca386fc34fbc0462de3356b83edb10982a..8847f3b5925a4eca17778431f4cf5d5a2b8ad786 100755 (executable)
@@ -3,14 +3,15 @@
 '''
 @author: Frank Brehm
 @contact: frank@brehm-online.com
-@copyright: © 2019 Frank Brehm, Berlin
+@copyright: © 2024 Frank Brehm, Berlin
 @license: GPL3
 @summary: test script (and module) for unit tests on config module
 '''
 
+import logging
 import os
 import sys
-import logging
+import textwrap
 
 try:
     import unittest2 as unittest
@@ -46,11 +47,14 @@ class TestCreateTerraformConfig(CreateTerraformTestcase):
     # -------------------------------------------------------------------------
     def test_import(self):
 
-        LOG.info("Testing import of cr_tf.config ...")
-        import cr_tf.config                                                 # noqa
+        LOG.info("Testing import of create_terraform.config ...")
+        import create_terraform.config
+        LOG.debug('Version of create_terraform.config: {!r}'.format(
+            create_terraform.config.__version__))
 
-        LOG.info("Testing import of VsphereConfig from cr_tf.config ...")
-        from cr_tf.config import VsphereConfig                              # noqa
+        LOG.info("Testing import of VsphereConfig from create_terraform.config ...")
+        from create_terraform.config import VsphereConfig
+        LOG.debug('Description of VsphereConfig: ' + textwrap.dedent(VsphereConfig.__doc__))
 
 
 # =============================================================================