From dfeee1fafe383f163104c967b3f6d1f52dfe92cd Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Fri, 5 Jan 2024 01:17:23 +0100 Subject: [PATCH] Do not print empty and successful tests in report. --- .github/workflows/UnitTesting.yml | 16 ++++++++-------- ExamplePipeline.yml | 2 +- doc/index.rst | 8 -------- pyDummy/__init__.py | 8 ++++---- setup.py | 2 +- tests/platform/Specific.py | 2 +- tests/unit/Dummy.py | 2 +- tests/unit/__init__.py | 2 +- 8 files changed, 17 insertions(+), 25 deletions(-) diff --git a/.github/workflows/UnitTesting.yml b/.github/workflows/UnitTesting.yml index 2be5a95..b15682e 100644 --- a/.github/workflows/UnitTesting.yml +++ b/.github/workflows/UnitTesting.yml @@ -293,11 +293,11 @@ jobs: # cd "${{ inputs.tests_directory || '.' }}" [ -n '${{ inputs.unittest_xml_artifact }}' ] && PYTEST_ARGS='--junitxml=report/unit/TestReportSummary.xml' || unset PYTEST_ARGS if [ -n '${{ inputs.coverage_config }}' ]; then - echo "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}" - coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }} + echo "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}" + coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }} else - echo "python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}" - python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }} + echo "python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}" + python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }} fi - name: ☑ Run unit tests (Windows) @@ -309,11 +309,11 @@ jobs: # cd "${{ inputs.tests_directory || '.' }}" $PYTEST_ARGS = if ("${{ inputs.unittest_xml_artifact }}") { "--junitxml=report/unit/TestReportSummary.xml" } else { "" } if ("${{ inputs.coverage_config }}") { - Write-Host "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -rA --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}" - coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }} + Write-Host "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}" + coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }} } else { - Write-Host "python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}" - python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }} + Write-Host "python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }}" + python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.unittest_directory }} } - name: Convert to XML format (Cobertura) diff --git a/ExamplePipeline.yml b/ExamplePipeline.yml index 04cde1c..15c08c0 100644 --- a/ExamplePipeline.yml +++ b/ExamplePipeline.yml @@ -4,7 +4,7 @@ # Unai Martinez-Corral # # # # ==================================================================================================================== # -# Copyright 2020-2023 The pyTooling Authors # +# Copyright 2020-2024 The pyTooling Authors # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # diff --git a/doc/index.rst b/doc/index.rst index d9f556b..59cfb84 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -122,14 +122,6 @@ License The accompanying documentation is licensed under **Creative Commons - Attribution 4.0 (CC-BY 4.0)**. ------------------------------------- - -.. |docdate| date:: %b %d, %Y - %H:%M - -.. only:: html - - This document was generated on |docdate|. - .. toctree:: :caption: Introduction :hidden: diff --git a/pyDummy/__init__.py b/pyDummy/__init__.py index 906b6c6..f8050ce 100644 --- a/pyDummy/__init__.py +++ b/pyDummy/__init__.py @@ -11,7 +11,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2017-2023 Patrick Lehmann - Bötzingen, Germany # +# Copyright 2017-2024 Patrick Lehmann - Bötzingen, Germany # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # @@ -34,13 +34,13 @@ A module for a set of dummy classes. __author__ = "Patrick Lehmann" __email__ = "Paebbels@gmail.com" -__copyright__ = "2017-2023, Patrick Lehmann" +__copyright__ = "2017-2024, Patrick Lehmann" __license__ = "Apache License, Version 2.0" __version__ = "0.4.4" __keywords__ = ["GitHub Actions"] __issue_tracker__ = "https://GitHub.com/pyTooling/Actions/issues" -from pyTooling.Decorators import export +from pyTooling.Decorators import export, readonly from pyTooling.Platform import Platform @@ -58,7 +58,7 @@ class Base: """ self._value = 0 - @property + @readonly def Value(self) -> int: """ Read-only property to return the internal value. diff --git a/setup.py b/setup.py index 0215b88..1885b98 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2017-2023 Patrick Lehmann - Bötzingen, Germany # +# Copyright 2017-2024 Patrick Lehmann - Bötzingen, Germany # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # diff --git a/tests/platform/Specific.py b/tests/platform/Specific.py index 17b922a..dc2c660 100644 --- a/tests/platform/Specific.py +++ b/tests/platform/Specific.py @@ -11,7 +11,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2017-2023 Patrick Lehmann - Bötzingen, Germany # +# Copyright 2017-2024 Patrick Lehmann - Bötzingen, Germany # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # diff --git a/tests/unit/Dummy.py b/tests/unit/Dummy.py index 08b9421..2fb41d7 100644 --- a/tests/unit/Dummy.py +++ b/tests/unit/Dummy.py @@ -11,7 +11,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2017-2023 Patrick Lehmann - Bötzingen, Germany # +# Copyright 2017-2024 Patrick Lehmann - Bötzingen, Germany # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index 600c2be..5a7925f 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -11,7 +11,7 @@ # # # License: # # ==================================================================================================================== # -# Copyright 2017-2023 Patrick Lehmann - Bötzingen, Germany # +# Copyright 2017-2024 Patrick Lehmann - Bötzingen, Germany # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. #