From ca8d95c243dacb367c0b11c5190d5ec56e402afd Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Wed, 6 Oct 2021 16:53:43 -0400 Subject: [tests] Run unit tests under avocado instead of nose `nose` is no longer maintained, and as of python-3.10 is functionally broken. As such, instead transition to running those tests via avocado, like we do with our integration test suite. The tests themselves do not need much modification, however due to the isolation provided for executing the tests we do need to explicitly set a new PYTHONPATH env var for those executions. This means we still need to run the unit tests as a separate step from the stageone tests. The changes needed are mostly around file paths relative to the pwd where the tests are executed from originally. Additionally, remove the sosreport_pexpect unit test as it is no longer useful in its own right, would need more significant changes to run properly with avocado, and the integration test suite provides better coverage for what it was testing. Closes: #2716 Signed-off-by: Jake Hunsaker --- tests/unittests/plugin_tests.py | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/unittests/plugin_tests.py') diff --git a/tests/unittests/plugin_tests.py b/tests/unittests/plugin_tests.py index 0105e3b8..0dfa243d 100644 --- a/tests/unittests/plugin_tests.py +++ b/tests/unittests/plugin_tests.py @@ -429,6 +429,7 @@ class RegexSubTests(unittest.TestCase): "never_copied", r"^(.*)$", "foobar")) def test_no_replacements(self): + self.mp.sysroot = '/' self.mp.add_copy_spec(j("tail_test.txt")) self.mp.collect() replacements = self.mp.do_file_sub( -- cgit