Skip to content

Commit f2ba4c8

Browse files
test_os_ops_common is synchronized with os_ops tests (#377)
1 parent ae46c66 commit f2ba4c8

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/test_os_ops_common.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_exec_command_success(self, os_ops: OsOperations):
7474
cmd = ["sh", "-c", "python3 --version"]
7575

7676
response = os_ops.exec_command(cmd)
77-
77+
assert type(response) is bytes
7878
assert b'Python 3.' in response
7979

8080
def test_exec_command_failure(self, os_ops: OsOperations):
@@ -273,7 +273,9 @@ def test_makedirs_and_rmdirs_success(self, os_ops: OsOperations):
273273
RunConditions.skip_if_windows()
274274

275275
cmd = "pwd"
276-
pwd = os_ops.exec_command(cmd, encoding='utf-8').strip()
276+
stdout = os_ops.exec_command(cmd, encoding='utf-8')
277+
assert type(stdout) is str
278+
pwd = stdout.strip()
277279

278280
path = "{}/test_dir".format(pwd)
279281

@@ -898,7 +900,7 @@ def LOCAL_server(s: socket.socket):
898900
if ok_count == 0:
899901
raise RuntimeError("No one free port was found.")
900902

901-
def test_get_tmpdir(self, os_ops: OsOperations):
903+
def test_get_tempdir(self, os_ops: OsOperations):
902904
assert isinstance(os_ops, OsOperations)
903905

904906
dir = os_ops.get_tempdir()
@@ -922,7 +924,7 @@ def test_get_tmpdir(self, os_ops: OsOperations):
922924
assert not os_ops.path_exists(file_path)
923925
assert not os.path.exists(file_path)
924926

925-
def test_get_tmpdir__compare_with_py_info(self, os_ops: OsOperations):
927+
def test_get_tempdir__compare_with_py_info(self, os_ops: OsOperations):
926928
assert isinstance(os_ops, OsOperations)
927929

928930
actual_dir = os_ops.get_tempdir()

0 commit comments

Comments
 (0)