Skip to content

Commit

Permalink
Try to see debug messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jul 18, 2024
1 parent dfd56ae commit 71e8838
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyVersioning/CLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def _print(key, value, indent):
@PathArgument(dest="Filename", metaName="<Output file>", optional=True, help="Output filename.")
def HandleField(self, args: Namespace) -> None:
"""Handle program calls for command ``field``."""
self.Configure(verbose=args.Verbose, debug=args.Debug, quiet=args.Filename is None)
self.Configure(verbose=args.Verbose, debug=args.Debug) #, quiet=args.Filename is None)
self._PrintHeadline()
self.Initialize(None if args.ConfigFile is None else Path(args.ConfigFile))

Expand Down
2 changes: 1 addition & 1 deletion pyVersioning/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
__email__ = "Paebbels@gmail.com"
__copyright__ = "2020-2024, Patrick Lehmann"
__license__ = "Apache License, Version 2.0"
__version__ = "0.16.2"
__version__ = "0.16.3"
__keywords__ = ["Python3", "Template", "Versioning", "Git"]

from dataclasses import make_dataclass
Expand Down
2 changes: 1 addition & 1 deletion tests/app/GitHub.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _run(cls, command: Nullable[str] = None, *args: Any):
for line in ex.stderr.split("\n"):
print(f" {line}")
print("-" * 80)
raise Exception(f"Error when executing the process: {ex}") from ex
raise AssertionError(f"Error when executing the process: {ex}") from ex
except Exception as ex:
print("-- EXCEPTION " + "-" * 67)
print(ex)
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/CIServices/NoService.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from re import compile as re_compile
from typing import Any, Dict

from pyTooling.Platform import CurrentPlatform, Platforms
from pytest import mark
from ruamel.yaml import YAML
from ruamel.yaml.reader import ReaderError
Expand Down Expand Up @@ -65,36 +66,43 @@ def _getServiceEnvironment(cls, **kwargs: Any) -> Dict[str, str]:

return env

@mark.skipif(Platforms.OS_Windows in CurrentPlatform._platform, reason="Skipped, if current platform is on Windows.")
def test_NoArguments(self):
print()

stdout, stderr = self._run()

@mark.skipif(Platforms.OS_Windows in CurrentPlatform._platform, reason="Skipped, if current platform is on Windows.")
def test_Help(self) -> None:
print()

stdout, stderr = self._run("help")

@mark.skipif(Platforms.OS_Windows in CurrentPlatform._platform, reason="Skipped, if current platform is on Windows.")
def test_Variables(self) -> None:
print()

stdout, stderr = self._run("variables")

@mark.skipif(Platforms.OS_Windows in CurrentPlatform._platform, reason="Skipped, if current platform is on Windows.")
def test_Field_Version(self) -> None:
print()

stdout, stderr = self._run("field", "version")

@mark.skipif(Platforms.OS_Windows in CurrentPlatform._platform, reason="Skipped, if current platform is on Windows.")
def test_Field_GitCommitHash(self) -> None:
print()

stdout, stderr = self._run("field", "git.commit.hash")

@mark.skipif(Platforms.OS_Windows in CurrentPlatform._platform, reason="Skipped, if current platform is on Windows.")
def test_Fillout_WithoutOutputFile(self) -> None:
print()

stdout, stderr = self._run("fillout", "tests/template.in")

@mark.skipif(Platforms.OS_Windows in CurrentPlatform._platform, reason="Skipped, if current platform is on Windows.")
def test_Fillout_WithOutputFile(self) -> None:
print()

Expand Down Expand Up @@ -138,6 +146,7 @@ def test_Json_WithOutputFile(self) -> None:
print(f" {item}")
self.fail("Unittest error: FileNotFoundError")

@mark.skipif(Platforms.OS_Windows in CurrentPlatform._platform, reason="Skipped, if current platform is on Windows.")
def test_Yaml_WithoutOutputFile(self) -> None:
print()

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/CIServices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def _run(cls, command: Nullable[str] = None, *args: Any) -> Tuple[str, str]:
for line in ex.stderr.split("\n"):
print(f" {line}")
print("-" * 80)
raise Exception(f"Error when executing the process: {ex}") from ex
raise AssertionError(f"Error when executing the process: {ex}") from ex
except Exception as ex:
print("-- EXCEPTION " + "-" * 67)
print(ex)
Expand Down

0 comments on commit 71e8838

Please sign in to comment.