fix-windows-ci (#462)

This commit is contained in:
q.yao 2022-05-11 20:39:31 +08:00 committed by GitHub
parent 5f59b4464f
commit 3e4547d17b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,8 @@ empty_path = './a.py'
@pytest.fixture(autouse=True, scope='module')
def create_empty_file():
os.mknod(empty_file_path)
with open(empty_file_path, mode='w'):
pass
class TestLoadConfigError:
@ -423,16 +424,17 @@ def test_export_info():
assert os.path.exists(deploy_json)
def test_target_wrapper():
def wrap_target():
return 0
def target():
return 0
def test_target_wrapper():
log_level = logging.INFO
ret_value = mp.Value('d', 0, lock=False)
ret_value.value = -1
wrap_func = partial(target_wrapper, target, log_level, ret_value)
wrap_func = partial(target_wrapper, wrap_target, log_level, ret_value)
process = mp.Process(target=wrap_func)
process.start()