Skip to content

Commit f225d58

Browse files
committed
Reference Python.Test explicitly
1 parent 3cc3908 commit f225d58

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/python_tests_runner/Python.PythonTestsRunner.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
<ItemGroup>
88
<ProjectReference Include="..\runtime\Python.Runtime.csproj" />
9+
<ProjectReference Include="..\testing\Python.Test.csproj" />
910
</ItemGroup>
1011

1112
<ItemGroup>

src/python_tests_runner/PythonTestRunner.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using NUnit.Framework;
99

1010
using Python.Runtime;
11+
using Python.Test;
1112

1213
namespace Python.PythonTestsRunner
1314
{

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ def pytest_addoption(parser):
3131

3232
def pytest_configure(config):
3333
global bin_path
34+
if "clr" in sys.modules:
35+
# Already loaded (e.g. by the C# test runner), skip build
36+
import clr
37+
clr.AddReference("Python.Test")
38+
return
39+
3440
runtime_opt = config.getoption("runtime")
3541

3642
test_proj_path = os.path.join(cwd, "..", "src", "testing")

0 commit comments

Comments
 (0)