You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The capgen unit tests are broken in the main branch:
Everything ok up to unit testing common.py:
..E..
======================================================================
ERROR: test_execute (__main__.CommonTestCase)
Test execute() function
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/heinzell/work/ccpp-framework/ccpp-framework/test/unit_tests/test_common.py", line 41, in test_execute
self.assertEqual(common.execute(f"ls {TEST_FILE}"),(0,f"{TEST_FILE}",""))
File "/Users/heinzell/work/ccpp-framework/ccpp-framework/scripts/common.py", line 98, in execute
raise Exception(message)
Exception: Execution of command ls test_common.py failed, exit code 1
stdout: ""
stderr: "ls: test_common.py: No such file or directory"
----------------------------------------------------------------------
Ran 5 tests in 0.032s
FAILED (errors=1)
Solution
Clearly a bug, because the test assumes that the file is in the local directory where the tests are executed, which is not the case if you run run_tests.sh in directory ./test. Simple fix is to use os.path.abspath.
Alternatives (optional)
n/a
Related to (optional)
n/a
The text was updated successfully, but these errors were encountered:
Description
The capgen unit tests are broken in the main branch:
Everything ok up to unit testing
common.py
:Solution
Clearly a bug, because the test assumes that the file is in the local directory where the tests are executed, which is not the case if you run
run_tests.sh
in directory./test
. Simple fix is to useos.path.abspath
.Alternatives (optional)
n/a
Related to (optional)
n/a
The text was updated successfully, but these errors were encountered: