From 2fb2e91755bc5b93a8d6cbb087e8e54290422da7 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sun, 21 Jun 2026 18:46:20 +0300 Subject: [PATCH] test_os_ops_common is synchronized with os_ops tests --- tests/test_os_ops_common.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_os_ops_common.py b/tests/test_os_ops_common.py index 29e2f1ff..4940e693 100644 --- a/tests/test_os_ops_common.py +++ b/tests/test_os_ops_common.py @@ -74,7 +74,7 @@ def test_exec_command_success(self, os_ops: OsOperations): cmd = ["sh", "-c", "python3 --version"] response = os_ops.exec_command(cmd) - + assert type(response) is bytes assert b'Python 3.' in response def test_exec_command_failure(self, os_ops: OsOperations): @@ -273,7 +273,9 @@ def test_makedirs_and_rmdirs_success(self, os_ops: OsOperations): RunConditions.skip_if_windows() cmd = "pwd" - pwd = os_ops.exec_command(cmd, wait_exit=True, encoding='utf-8').strip() + stdout = os_ops.exec_command(cmd, encoding='utf-8') + assert type(stdout) is str + pwd = stdout.strip() path = "{}/test_dir".format(pwd) @@ -898,7 +900,7 @@ def LOCAL_server(s: socket.socket): if ok_count == 0: raise RuntimeError("No one free port was found.") - def test_get_tmpdir(self, os_ops: OsOperations): + def test_get_tempdir(self, os_ops: OsOperations): assert isinstance(os_ops, OsOperations) dir = os_ops.get_tempdir() @@ -922,7 +924,7 @@ def test_get_tmpdir(self, os_ops: OsOperations): assert not os_ops.path_exists(file_path) assert not os.path.exists(file_path) - def test_get_tmpdir__compare_with_py_info(self, os_ops: OsOperations): + def test_get_tempdir__compare_with_py_info(self, os_ops: OsOperations): assert isinstance(os_ops, OsOperations) actual_dir = os_ops.get_tempdir()