diff --git a/tests/test_pipe.py b/tests/test_pipe.py index 92c45d8..c05a49c 100644 --- a/tests/test_pipe.py +++ b/tests/test_pipe.py @@ -58,6 +58,6 @@ def test_pipe_unicode_name(): with windows.pipe.create(UNICODE_PIPE_NAME) as np: # also Try the connect API with the unicode name np2 = windows.pipe.connect(UNICODE_PIPE_NAME) - assert np.name == np2.name == UNICODE_PIPE_NAME - assert UNICODE_PIPE_NAME in np.path - assert UNICODE_PIPE_NAME in np2.path \ No newline at end of file + assert np.name == np2.name + assert np.name.endswith(UNICODE_PIPE_NAME) + assert np2.name.endswith(UNICODE_PIPE_NAME) \ No newline at end of file diff --git a/tests/test_system.py b/tests/test_system.py index 33f1216..927299e 100644 --- a/tests/test_system.py +++ b/tests/test_system.py @@ -1,6 +1,7 @@ import ctypes import pytest import windows +import windows.generated_def as gdef from .pfwtest import * @@ -39,7 +40,7 @@ class TestSystemWithCheckGarbage(object): assert ldrive.volume_info except WindowsError as e: #handle ERROR_NOT_READY returned by A: in github CI - if e.winerror != ERROR_NOT_READY: + if e.winerror != gdef.ERROR_NOT_READY: raise def test_wmi(self):