From 6a119f2b0ebd765fcf4a20b3b584adfc20b750d7 Mon Sep 17 00:00:00 2001 From: Vladimir Roncevic Date: Mon, 8 Jul 2024 19:04:10 +0200 Subject: [PATCH] [gen_efi_app] Updated ATS CLI mechanism, docs --- Dockerfile | 6 +- README.md | 10 + docs/build/doctrees/environment.pickle | Bin 236269 -> 236249 bytes docs/build/doctrees/gen_efi_app.doctree | Bin 29825 -> 29801 bytes docs/build/html/_modules/gen_efi_app.html | 20 +- docs/build/html/_modules/gen_efi_app/pro.html | 2 +- .../gen_efi_app/pro/read_template.html | 2 +- .../gen_efi_app/pro/write_template.html | 2 +- docs/build/html/gen_efi_app.html | 2 +- docs/build/html/objects.inv | Bin 555 -> 555 bytes docs/build/html/searchindex.js | 2 +- docs/source/conf.py | 2 +- gen_efi_app/__init__.py | 20 +- gen_efi_app/conf/gen_efi_app.cfg | 2 +- gen_efi_app/log/gen_efi_app.log | 4 - gen_efi_app/pro/__init__.py | 2 +- gen_efi_app/pro/read_template.py | 2 +- gen_efi_app/pro/write_template.py | 2 +- gen_efi_app/run/gen_efi_app_run.py | 2 +- setup.cfg | 2 +- setup.py | 4 +- tests/.coverage | Bin 53248 -> 53248 bytes tests/gen_efi_app_coverage.json | 1 + tests/gen_efi_app_coverage.xml | 280 ++++++++++++++++++ tests/gen_efi_app_pro_test.py | 2 +- tests/gen_efi_app_test.py | 12 +- tests/read_template_test.py | 2 +- tests/run_coverage.sh | 8 +- tests/write_template_test.py | 2 +- 29 files changed, 341 insertions(+), 54 deletions(-) create mode 100644 tests/gen_efi_app_coverage.json create mode 100644 tests/gen_efi_app_coverage.xml diff --git a/Dockerfile b/Dockerfile index 97a4d69..4fc01a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,11 @@ RUN DEBIAN_FRONTEND=noninteractive \ openssl \ python3 \ python3-dev \ - libyaml-dev + libyaml-dev \ + build-essential \ + uuid-dev \ + iasl \ + nasm RUN wget https://bootstrap.pypa.io/get-pip.py RUN python3 get-pip.py diff --git a/README.md b/README.md index 9330108..ce558ba 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,16 @@ Generator structure 6 directories, 17 files ``` +### Code coverage + +| Name | Stmts | Miss | Cover | +|------|-------|------|-------| +| `gen_efi_app/__init__.py` | 71 | 12 | 83% | +| `gen_efi_app/pro/__init__.py` | 59 | 2 | 97% | +| `gen_efi_app/pro/read_template.py` | 53 | 2 | 96% | +| `gen_efi_app/pro/write_template.py` | 59 | 4 | 93% | +| **Total** | 242 | 20 | 92% | + ### Docs [![Documentation Status](https://readthedocs.org/projects/gen_efi_app/badge/?version=latest)](https://gen-efi-app.readthedocs.io/en/latest/?badge=latest) diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle index 1b7d57e6706fe4d99eea996b3ddda28864942711..8545d0e9df6bf5b31a42e565505b98b93d3cf0d5 100644 GIT binary patch delta 2560 zcmZWqe^Ars8PEGZKp^}K7!`;lA%PGG0TdI0Rgns6sUQkc=h-ZS)F#CcAe4F91fkQy z!bW{#-=6iV*Phzlwr-Bux7ypZ=dHKi+1YJ6ueV;+X~iE{*j(q_=G^;!^F`VA{o{E) z&+q5`@x0$V$J0JLo)$L{zt4UwPLEOLcmY;v$%->NWhCC~@9=z^g!A$(5#_e7j=oM$ zZ#0s=)#G=0p7Xlgfq*U0(-n;*&(e@Xc}r18x|xy{+3P+%|bDvq~&|ur?d%D z$cS>v@`@yhR3pmu_lG4(BpFdojE+cBSdy|%#iU)5^ukA6B5}qwNh0g_qeYQ5WQEyD z%1aaXnp9{#sVJ!-Pp- zE}>!tU_>W4{$=B8<@~4sl@;7TOSzC}o-Zbix#-#pvU2>?fnLJnO zAj_;OvdgR?SItf2HM4P63mwH4@=~FRd$o#O$V@_obIGUXR?Y0vV?MD5Ga3IsgP~YI zlR@g{s<}3CCZ6mn*`ySkHWS`vZIzrv$sbw`y!F7NvYF(A(yeG{+-TDRXEhZnBW+b< z&A6+@h>(@~GjV=Wr`NWkWy6!5UTTP-L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ztohMUXxJMH`yzc&e<;{D%$Nr*3&`|Scu+gu# z@t0$AGv7A&1UNL<8Dvx2;5gDr-=kH>zsG*|_zt+CQMzZZ_CsZ^QF@?O7xJ*g-Y=eK zZHokB*Z05xFJb%#8*_BhBbH(0kpz3{r?B!{G0P!%X+f#H05UF!Kfg diff --git a/docs/build/doctrees/gen_efi_app.doctree b/docs/build/doctrees/gen_efi_app.doctree index 0970a16ca35d02f5c553822f84e4b1a5ca2be1aa..764b2dfe32159130267e78370b4ca727a0d538ba 100644 GIT binary patch delta 129 zcmZpC$@uaGBTED8)VPf-ljRw8CeM&pWpfM(cFxJ1d|KX`QFZcsc{!MXv4W;BL~cs! zl*TEwQ#3N9v!*jmW^|XG+@o+*O(LBTED8)Uu5%ljRvrCeM&pSource code for gen_efi_app
 '''
 
 import sys
-from typing import List, Dict
+from typing import List, Dict, Optional
 from os.path import exists, dirname, realpath
 from os import getcwd
 from argparse import Namespace
 
 try:
     from ats_utilities.splash import Splash
-    from ats_utilities.cli.cfg_cli import CfgCLI
+    from ats_utilities.cli import ATSCli
     from ats_utilities.logging import ATSLogger
     from ats_utilities.console_io.error import error_message
     from ats_utilities.console_io.verbose import verbose_message
@@ -82,7 +82,7 @@ 

Source code for gen_efi_app

 __copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app'
 __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation']
 __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE'
-__version__ = '1.3.3'
+__version__ = '1.3.4'
 __maintainer__ = 'Vladimir Roncevic'
 __email__ = 'elektron.ronca@gmail.com'
 __status__ = 'Updated'
@@ -90,7 +90,7 @@ 

Source code for gen_efi_app

 
 
[docs] -class GenEfiApp(CfgCLI): +class GenEfiApp(ATSCli): ''' Defines class GenEfiApp with attribute(s) and method(s). Loads a base info, creates a CLI interface and runs operations. @@ -138,9 +138,9 @@

Source code for gen_efi_app

             verbose, [f'{self._GEN_VERBOSE.lower()} init tool info']
         )
         self._logger: ATSLogger = ATSLogger(
-            self._GEN_VERBOSE.lower(), f'{current_dir}{self._LOG}', verbose
+            self._GEN_VERBOSE.lower(), True, None, True, verbose
         )
-        if self.tool_operational:
+        if self.is_operational():
             self.add_new_option(
                 self._OPS[0], self._OPS[1], dest='name',
                 help='generate project (provide name)'
@@ -164,10 +164,10 @@ 

Source code for gen_efi_app

             :exceptions: None
         '''
         status: bool = False
-        if self.tool_operational:
+        if self.is_operational():
             try:
-                args: Namespace = self.parse_args(sys.argv)
-                if not bool(getattr(args, "name")):
+                args: Optional[Namespace] = self.parse_args(sys.argv)
+                if not bool(getattr(args, 'name')):
                     error_message(
                         [f'{self._GEN_VERBOSE.lower()} missing name argument']
                     )
@@ -207,7 +207,7 @@ 

Source code for gen_efi_app

                     )
             except SystemExit:
                 error_message(
-                    [f'{self._GEN_VERBOSE.lower()} expected argument -n']
+                    [f'{self._GEN_VERBOSE.lower()} expected argument name']
                 )
                 return status
         else:
diff --git a/docs/build/html/_modules/gen_efi_app/pro.html b/docs/build/html/_modules/gen_efi_app/pro.html
index 15f0041..95f0465 100644
--- a/docs/build/html/_modules/gen_efi_app/pro.html
+++ b/docs/build/html/_modules/gen_efi_app/pro.html
@@ -81,7 +81,7 @@ 

Source code for gen_efi_app.pro

 __copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app'
 __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation']
 __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE'
-__version__ = '1.3.3'
+__version__ = '1.3.4'
 __maintainer__ = 'Vladimir Roncevic'
 __email__ = 'elektron.ronca@gmail.com'
 __status__ = 'Updated'
diff --git a/docs/build/html/_modules/gen_efi_app/pro/read_template.html b/docs/build/html/_modules/gen_efi_app/pro/read_template.html
index b3a52e9..b8bfc0f 100644
--- a/docs/build/html/_modules/gen_efi_app/pro/read_template.html
+++ b/docs/build/html/_modules/gen_efi_app/pro/read_template.html
@@ -79,7 +79,7 @@ 

Source code for gen_efi_app.pro.read_template

__copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app' __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE' -__version__ = '1.3.3' +__version__ = '1.3.4' __maintainer__ = 'Vladimir Roncevic' __email__ = 'elektron.ronca@gmail.com' __status__ = 'Updated' diff --git a/docs/build/html/_modules/gen_efi_app/pro/write_template.html b/docs/build/html/_modules/gen_efi_app/pro/write_template.html index 30574bc..e9fd85c 100644 --- a/docs/build/html/_modules/gen_efi_app/pro/write_template.html +++ b/docs/build/html/_modules/gen_efi_app/pro/write_template.html @@ -80,7 +80,7 @@

Source code for gen_efi_app.pro.write_template

__copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app' __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE' -__version__ = '1.3.3' +__version__ = '1.3.4' __maintainer__ = 'Vladimir Roncevic' __email__ = 'elektron.ronca@gmail.com' __status__ = 'Updated' diff --git a/docs/build/html/gen_efi_app.html b/docs/build/html/gen_efi_app.html index ba261ee..da2b5b6 100644 --- a/docs/build/html/gen_efi_app.html +++ b/docs/build/html/gen_efi_app.html @@ -102,7 +102,7 @@

Subpackages
class gen_efi_app.GenEfiApp(verbose: bool = False)[source]ΒΆ
-

Bases: CfgCLI

+

Bases: ATSCli

Defines class GenEfiApp with attribute(s) and method(s). Loads a base info, creates a CLI interface and runs operations.

It defines:

diff --git a/docs/build/html/objects.inv b/docs/build/html/objects.inv index 5d6001b68db4f6c85eeafbf994f0c05a0af4d2c3..0df73b9cf6d8ebc8e5d33284e6897ec4b30dd01e 100644 GIT binary patch delta 12 TcmZ3@vYKUrGo#5ym* None: verbose, [f'{self._GEN_VERBOSE.lower()} init tool info'] ) self._logger: ATSLogger = ATSLogger( - self._GEN_VERBOSE.lower(), f'{current_dir}{self._LOG}', verbose + self._GEN_VERBOSE.lower(), True, None, True, verbose ) - if self.tool_operational: + if self.is_operational(): self.add_new_option( self._OPS[0], self._OPS[1], dest='name', help='generate project (provide name)' @@ -122,10 +122,10 @@ def process(self, verbose: bool = False) -> bool: :exceptions: None ''' status: bool = False - if self.tool_operational: + if self.is_operational(): try: - args: Namespace = self.parse_args(sys.argv) - if not bool(getattr(args, "name")): + args: Optional[Namespace] = self.parse_args(sys.argv) + if not bool(getattr(args, 'name')): error_message( [f'{self._GEN_VERBOSE.lower()} missing name argument'] ) @@ -165,7 +165,7 @@ def process(self, verbose: bool = False) -> bool: ) except SystemExit: error_message( - [f'{self._GEN_VERBOSE.lower()} expected argument -n'] + [f'{self._GEN_VERBOSE.lower()} expected argument name'] ) return status else: diff --git a/gen_efi_app/conf/gen_efi_app.cfg b/gen_efi_app/conf/gen_efi_app.cfg index 6251edb..b286158 100644 --- a/gen_efi_app/conf/gen_efi_app.cfg +++ b/gen_efi_app/conf/gen_efi_app.cfg @@ -1,4 +1,4 @@ ats_name = gen_efi_app -ats_version = v1.3.3 +ats_version = v1.3.4 ats_build_date = 2020 ats_licence = https://github.com/electux/gen_efi_app/blob/dev/LICENSE diff --git a/gen_efi_app/log/gen_efi_app.log b/gen_efi_app/log/gen_efi_app.log index 982d242..e69de29 100644 --- a/gen_efi_app/log/gen_efi_app.log +++ b/gen_efi_app/log/gen_efi_app.log @@ -1,4 +0,0 @@ -07/03/2024 11:26:04 PM - INFO - generation latest done -07/03/2024 11:26:05 PM - ERROR - tool is not operational -07/03/2024 11:29:32 PM - INFO - generation latest done -07/03/2024 11:29:33 PM - ERROR - tool is not operational diff --git a/gen_efi_app/pro/__init__.py b/gen_efi_app/pro/__init__.py index b8a3825..b85f6bc 100644 --- a/gen_efi_app/pro/__init__.py +++ b/gen_efi_app/pro/__init__.py @@ -42,7 +42,7 @@ __copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app' __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE' -__version__ = '1.3.3' +__version__ = '1.3.4' __maintainer__ = 'Vladimir Roncevic' __email__ = 'elektron.ronca@gmail.com' __status__ = 'Updated' diff --git a/gen_efi_app/pro/read_template.py b/gen_efi_app/pro/read_template.py index 2a562f0..b6c9265 100644 --- a/gen_efi_app/pro/read_template.py +++ b/gen_efi_app/pro/read_template.py @@ -39,7 +39,7 @@ __copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app' __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE' -__version__ = '1.3.3' +__version__ = '1.3.4' __maintainer__ = 'Vladimir Roncevic' __email__ = 'elektron.ronca@gmail.com' __status__ = 'Updated' diff --git a/gen_efi_app/pro/write_template.py b/gen_efi_app/pro/write_template.py index 3dbf6af..c5e7103 100644 --- a/gen_efi_app/pro/write_template.py +++ b/gen_efi_app/pro/write_template.py @@ -40,7 +40,7 @@ __copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app' __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE' -__version__ = '1.3.3' +__version__ = '1.3.4' __maintainer__ = 'Vladimir Roncevic' __email__ = 'elektron.ronca@gmail.com' __status__ = 'Updated' diff --git a/gen_efi_app/run/gen_efi_app_run.py b/gen_efi_app/run/gen_efi_app_run.py index bf24e3e..e62c720 100644 --- a/gen_efi_app/run/gen_efi_app_run.py +++ b/gen_efi_app/run/gen_efi_app_run.py @@ -33,7 +33,7 @@ __copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app' __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE' -__version__ = '1.3.3' +__version__ = '1.3.4' __maintainer__ = 'Vladimir Roncevic' __email__ = 'elektron.ronca@gmail.com' __status__ = 'Updated' diff --git a/setup.cfg b/setup.cfg index e411346..44846b4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ [metadata] name = gen_efi_app -version = 1.3.3 +version = 1.3.4 author = Vladimir Roncevic author_email = elektron.ronca@gmail.com description = EFI application generator diff --git a/setup.py b/setup.py index a379028..3bd71b9 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ __copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app' __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE' -__version__ = '1.3.3' +__version__ = '1.3.4' __maintainer__ = 'Vladimir Roncevic' __email__ = 'elektron.ronca@gmail.com' __status__ = 'Updated' @@ -61,7 +61,7 @@ PYP_CLASSIFIERS: List[str] = SUPPORTED_PY_VERSIONS + APPROVED_LICENSES setup( name='gen_efi_app', - version='1.3.3', + version='1.3.4', description='EFI Application generator', author='Vladimir Roncevic', author_email='elektron.ronca@gmail.com', diff --git a/tests/.coverage b/tests/.coverage index cfa973377eec828ef0dac6a6a1217c367bc4c4c0..6c3c7ec2d9193d8556243b5720dc557c26784b63 100644 GIT binary patch delta 15 WcmZozz}&EadBeYcCI*&86C40C-v#^t delta 15 XcmZozz}&EadBeYcrVXr%CO7~9Hd6+z diff --git a/tests/gen_efi_app_coverage.json b/tests/gen_efi_app_coverage.json new file mode 100644 index 0000000..80d6214 --- /dev/null +++ b/tests/gen_efi_app_coverage.json @@ -0,0 +1 @@ +{"meta": {"format": 2, "version": "7.5.3", "timestamp": "2024-07-08T19:03:06.297492", "branch_coverage": false, "show_contexts": false}, "files": {"/data/dev/python/3_tools/gen_efi_app/github/gen_efi_app/gen_efi_app/__init__.py": {"executed_lines": [3, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 43, 44, 45, 46, 47, 48, 49, 50, 53, 54, 72, 73, 74, 75, 76, 78, 86, 87, 94, 95, 96, 97, 100, 103, 104, 108, 114, 124, 125, 126, 127, 128, 129, 132, 133, 134, 138, 139, 140, 141, 148, 155, 156, 157, 178], "summary": {"covered_lines": 59, "num_statements": 71, "percent_covered": 83.09859154929578, "percent_covered_display": "83", "missing_lines": 12, "excluded_lines": 0}, "missing_lines": [39, 41, 152, 153, 154, 162, 163, 166, 167, 170, 172, 175], "excluded_lines": []}, "/data/dev/python/3_tools/gen_efi_app/github/gen_efi_app/gen_efi_app/pro/__init__.py": {"executed_lines": [3, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 45, 46, 47, 48, 51, 52, 70, 71, 73, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 104, 106, 114, 116, 128, 129, 130, 133, 134, 135, 136, 137, 138, 139, 142, 143, 144], "summary": {"covered_lines": 57, "num_statements": 59, "percent_covered": 96.61016949152543, "percent_covered_display": "97", "missing_lines": 2, "excluded_lines": 0}, "missing_lines": [37, 39], "excluded_lines": []}, "/data/dev/python/3_tools/gen_efi_app/github/gen_efi_app/gen_efi_app/pro/read_template.py": {"executed_lines": [3, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 48, 49, 63, 64, 66, 74, 75, 76, 77, 78, 79, 80, 82, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 116, 117, 118], "summary": {"covered_lines": 51, "num_statements": 53, "percent_covered": 96.22641509433963, "percent_covered_display": "96", "missing_lines": 2, "excluded_lines": 0}, "missing_lines": [34, 36], "excluded_lines": []}, "/data/dev/python/3_tools/gen_efi_app/github/gen_efi_app/gen_efi_app/pro/write_template.py": {"executed_lines": [3, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 39, 40, 41, 42, 43, 44, 45, 46, 49, 50, 63, 65, 73, 74, 76, 95, 96, 97, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 118, 119, 120, 121, 122, 123, 124, 125, 127, 130, 131, 134], "summary": {"covered_lines": 55, "num_statements": 59, "percent_covered": 93.22033898305085, "percent_covered_display": "93", "missing_lines": 4, "excluded_lines": 0}, "missing_lines": [35, 37, 105, 133], "excluded_lines": []}}, "totals": {"covered_lines": 222, "num_statements": 242, "percent_covered": 91.73553719008264, "percent_covered_display": "92", "missing_lines": 20, "excluded_lines": 0}} \ No newline at end of file diff --git a/tests/gen_efi_app_coverage.xml b/tests/gen_efi_app_coverage.xml new file mode 100644 index 0000000..b97fa14 --- /dev/null +++ b/tests/gen_efi_app_coverage.xml @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/gen_efi_app_pro_test.py b/tests/gen_efi_app_pro_test.py index 3ba8f7b..aaa3309 100644 --- a/tests/gen_efi_app_pro_test.py +++ b/tests/gen_efi_app_pro_test.py @@ -38,7 +38,7 @@ __copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app' __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE' -__version__ = '1.3.3' +__version__ = '1.3.4' __maintainer__ = 'Vladimir Roncevic' __email__ = 'elektron.ronca@gmail.com' __status__ = 'Updated' diff --git a/tests/gen_efi_app_test.py b/tests/gen_efi_app_test.py index d6a261c..0326aa9 100644 --- a/tests/gen_efi_app_test.py +++ b/tests/gen_efi_app_test.py @@ -37,7 +37,7 @@ __copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app' __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE' -__version__ = '1.3.3' +__version__ = '1.3.4' __maintainer__ = 'Vladimir Roncevic' __email__ = 'elektron.ronca@gmail.com' __status__ = 'Updated' @@ -59,7 +59,6 @@ class GenEfiAppTestCase(TestCase): | test_default_create - Default on create is not None. | test_missing_args - Missing args. | test_process - Generate project. - | test_tool_not_operational - Generate project not operational. | test_pro_already_exists - Generate already existing project. ''' @@ -96,15 +95,6 @@ def test_process(self) -> None: generator: GenEfiApp = GenEfiApp() self.assertTrue(generator.process()) - def test_tool_not_operational(self) -> None: - '''Generate project not operational''' - sys.argv.clear() - sys.argv.insert(0, '-n') - sys.argv.insert(1, 'fresh') - generator: GenEfiApp = GenEfiApp() - generator.tool_operational = False - self.assertFalse(generator.process()) - def test_pro_already_exists(self) -> None: '''Generate already existing project''' sys.argv.clear() diff --git a/tests/read_template_test.py b/tests/read_template_test.py index fe90d7c..da8faf0 100644 --- a/tests/read_template_test.py +++ b/tests/read_template_test.py @@ -40,7 +40,7 @@ __copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app' __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE' -__version__ = '1.3.3' +__version__ = '1.3.4' __maintainer__ = 'Vladimir Roncevic' __email__ = 'elektron.ronca@gmail.com' __status__ = 'Updated' diff --git a/tests/run_coverage.sh b/tests/run_coverage.sh index 0ef1b91..8994abd 100755 --- a/tests/run_coverage.sh +++ b/tests/run_coverage.sh @@ -7,6 +7,12 @@ # @author Vladimir Roncevic # +rm -rf htmlcov gen_efi_app_coverage.xml gen_efi_app_coverage.json .coverage +rm -rf new_simple_test/ full_simple/ latest/ empty_simple_test/ +ats_coverage_run.py -n gen_efi_app -p ../README.md rm -rf new_simple_test/ full_simple/ latest/ empty_simple_test/ python3 -m coverage run -m --source=../gen_efi_app unittest discover -s ./ -p '*_test.py' -vvv -python3 -m coverage html +python3 -m coverage html -d htmlcov +python3 -m coverage xml -o gen_efi_app_coverage.xml +python3 -m coverage json -o gen_efi_app_coverage.json +python3 -m coverage report --format=markdown -m diff --git a/tests/write_template_test.py b/tests/write_template_test.py index 18f0978..9bae622 100644 --- a/tests/write_template_test.py +++ b/tests/write_template_test.py @@ -41,7 +41,7 @@ __copyright__ = '(C) 2024, https://electux.github.io/gen_efi_app' __credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] __license__ = 'https://github.com/electux/gen_efi_app/blob/dev/LICENSE' -__version__ = '1.3.3' +__version__ = '1.3.4' __maintainer__ = 'Vladimir Roncevic' __email__ = 'elektron.ronca@gmail.com' __status__ = 'Updated'