-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix broken unit test #15
Labels
test
Test related issues
Comments
The current CI tests fail with: ============================= test session starts ==============================
platform linux -- Python 3.11.7, pytest-8.0.0, pluggy-1.4.0
rootdir: /home/runner/work/terracumber/terracumber
plugins: cov-4.1.0
collected 29 items
test/test_config.py . [ 3%]
test/test_cucumber.py ...... [ 24%]
test/test_git.py .xx..x.. [ 51%]
test/test_junit.py .Fx. [ 65%]
test/test_mailer.py . [ 68%]
test/test_terraformer.py ....... [ 93%]
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/coverage/inorout.py:503: CoverageWarning: Module com was never imported. (module-not-imported)
self.warn(f"Module {pkg} was never imported.", slug="module-not-imported")
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/coverage/control.py:887: CoverageWarning: No data was collected. (no-data-collected)
self._warn("No data was collected.", slug="no-data-collected")
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pytest_cov/plugin.py:312: CovReportWarning: Failed to generate report: No data to report.
warnings.warn(CovReportWarning(message))
test/test_utils.py .. [100%]WARNING: Failed to generate report: No data to report.
=================================== FAILURES ===================================
__________________________ TestJunit.test_get_totals ___________________________
self = <test.test_junit.TestJunit testMethod=test_get_totals>
def test_get_totals(self):
totals = {'failures': 3, 'errors': 0, 'skipped': 0, 'passed': 63, 'tests': 66, 'time': 1334.586592}
> self.assertDictEqual(self.junit.get_totals(), totals)
E AssertionError: {'fai[29 chars]ped': 0, 'passed': 63, 'tests': 66, 'time': 1334.5865919999999} != {'fai[29 chars]ped': 0, 'passed': 63, 'tests': 66, 'time': 1334.586592}
E {'errors': 0,
E 'failures': 3,
E 'passed': 63,
E 'skipped': 0,
E 'tests': 66,
E - 'time': 1334.5865919999999}
E ? ^^^^^^^^
E
E + 'time': 1334.586592}
E ? ^
test/test_junit.py:24: AssertionError
=============================== warnings summary ===============================
terracumber/git.py:86
/home/runner/work/terracumber/terracumber/terracumber/git.py:86: DeprecationWarning: invalid escape sequence '\/'
if re.match('refs\/tags\/.+', reference):
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
- generated xml file: /home/runner/work/terracumber/terracumber/junit/test-results.xml -
---------- coverage: platform linux, python 3.11.7-final-0 -----------
=========================== short test summary info ============================
FAILED test/test_junit.py::TestJunit::test_get_totals - AssertionError: {'fai[29 chars]ped': 0, 'passed': 63, 'tests': 66, 'time': 1334.5865919999999} != {'fai[29 chars]ped': 0, 'passed': 63, 'tests': 66, 'time': 1334.586592}
{'errors': 0,
'failures': 3,
'passed': 63,
'skipped': 0,
'tests': 66,
- 'time': 1334.5865919999999}
? ^^^^^^^^
+ 'time': 1334.586592}
? ^
============== 1 failed, 24 passed, 4 xfailed, 1 warning in 1.[51](https://github.com/uyuni-project/terracumber/pull/30/checks#step:5:52)s ============== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Python 3.11.7 was used.
The text was updated successfully, but these errors were encountered: