Skip to content

Commit

Permalink
fix-windows-ci (open-mmlab#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
grimoire authored May 11, 2022
1 parent 5f59b44 commit 3e4547d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_utils/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

@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:
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 3e4547d

Please sign in to comment.