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

New loading based on clr_loader#1373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
filmor merged 9 commits intopythonnet:masterfromfilmor:clr-loader
Feb 14, 2021
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Fix PythonTestRunner to work with new pytest setup
  • Loading branch information
@filmor
filmor committedFeb 14, 2021
commitf0011a51fd494740f9768caf2074e5275ae7a0d1
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@

<ItemGroup>
<ProjectReference Include="..\runtime\Python.Runtime.csproj" />
<ProjectReference Include="..\testing\Python.Test.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletionsrc/python_tests_runner/PythonTestRunner.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@
using NUnit.Framework;

using Python.Runtime;
using Python.Test;

namespace Python.PythonTestsRunner
{
Expand DownExpand Up@@ -50,7 +51,7 @@ public void RunPythonTest(string testFile, string testName)
{
folder = Path.GetDirectoryName(folder);
}
folder = Path.Combine(folder, "tests");
folder = Path.Combine(folder, "..", "tests");
string path = Path.Combine(folder, testFile + ".py");
if (!File.Exists(path)) throw new FileNotFoundException("Cannot find test file", path);

Expand Down
11 changes: 10 additions & 1 deletiontests/conftest.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,12 @@ def pytest_addoption(parser):

def pytest_configure(config):
global bin_path
if "clr" in sys.modules:
# Already loaded (e.g. by the C# test runner), skip build
import clr
clr.AddReference("Python.Test")
return

runtime_opt = config.getoption("runtime")

test_proj_path = os.path.join(cwd, "..", "src", "testing")
Expand DownExpand Up@@ -70,7 +76,10 @@ def pytest_configure(config):

def pytest_unconfigure(config):
global bin_path
shutil.rmtree(bin_path)
try:
shutil.rmtree(bin_path)
except Exception:
pass

def pytest_report_header(config):
"""Generate extra report headers"""
Expand Down

[8]ページ先頭

©2009-2026 Movatter.jp