Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1493b4d

Browse files
committed
Fix domain reload tests and activate them on macOS
1 parent9d2be14 commit1493b4d

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

‎src/domain_tests/test_domain_reload.py

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
importpytest
66

7+
frompythonnet.find_libpythonimportfind_libpython
8+
libpython=find_libpython()
9+
10+
pytestmark=pytest.mark.xfail(libpythonisNone,reason="Can't find suitable libpython")
11+
12+
713
def_run_test(testname):
814
dirname=os.path.split(__file__)[0]
915
exename=os.path.join(dirname,'bin','Python.DomainReloadTests.exe')
@@ -12,90 +18,73 @@ def _run_test(testname):
1218
ifplatform.system()!='Windows':
1319
args= ['mono']+args
1420

15-
proc=subprocess.Popen(args)
21+
env=os.environ.copy()
22+
env["PYTHONNET_PYDLL"]=libpython
23+
24+
proc=subprocess.Popen(args,env=env)
1625
proc.wait()
1726

1827
assertproc.returncode==0
1928

20-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
2129
deftest_rename_class():
2230
_run_test('class_rename')
2331

24-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
2532
deftest_rename_class_member_static_function():
2633
_run_test('static_member_rename')
2734

28-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
2935
deftest_rename_class_member_function():
3036
_run_test('member_rename')
3137

32-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
3338
deftest_rename_class_member_field():
3439
_run_test('field_rename')
3540

36-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
3741
deftest_rename_class_member_property():
3842
_run_test('property_rename')
3943

40-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
4144
deftest_rename_namespace():
4245
_run_test('namespace_rename')
4346

44-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
4547
deftest_field_visibility_change():
4648
_run_test("field_visibility_change")
4749

48-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
4950
deftest_method_visibility_change():
5051
_run_test("method_visibility_change")
5152

52-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
5353
deftest_property_visibility_change():
5454
_run_test("property_visibility_change")
5555

56-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
5756
deftest_class_visibility_change():
5857
_run_test("class_visibility_change")
5958

6059
@pytest.mark.skip(reason='FIXME: Domain reload fails when Python points to a .NET object which points back to Python objects')
61-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
6260
deftest_method_parameters_change():
6361
_run_test("method_parameters_change")
6462

65-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
6663
deftest_method_return_type_change():
6764
_run_test("method_return_type_change")
6865

69-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
7066
deftest_field_type_change():
7167
_run_test("field_type_change")
7268

73-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
7469
@pytest.mark.xfail(reason="Events not yet serializable")
7570
deftest_rename_event():
7671
_run_test('event_rename')
7772

78-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
7973
@pytest.mark.xfail(reason="newly instanced object uses PyType_GenericAlloc")
8074
deftest_construct_removed_class():
8175
_run_test("construct_removed_class")
8276

83-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
8477
deftest_out_to_ref_param():
8578
_run_test("out_to_ref_param")
8679

87-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
8880
deftest_ref_to_out_param():
8981
_run_test("ref_to_out_param")
9082

91-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
9283
deftest_ref_to_in_param():
9384
_run_test("ref_to_in_param")
9485

95-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
9686
deftest_in_to_ref_param():
9787
_run_test("in_to_ref_param")
9888

99-
@pytest.mark.skipif(platform.system()=='Darwin',reason='FIXME: macos can\'t find the python library')
10089
deftest_nested_type():
10190
_run_test("nested_type")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp