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

Commitf2ceaf6

Browse files
committed
EmbeddedPythonTest is even smarter about finding tests directory
1 parentbb7ff4d commitf2ceaf6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/embed_tests/TestPythonTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
usingSystem.Linq;
55
usingSystem.Reflection;
66
usingSystem.Text;
7+
78
usingNUnit.Framework;
9+
810
usingPython.Runtime;
911

1012
namespacePython.EmbeddingTest
@@ -32,8 +34,8 @@ static IEnumerable<string[]> MyTestCases()
3234
publicvoidEmbeddedPythonTest(stringtestFile,stringtestName)
3335
{
3436
// Find the tests directory
35-
stringfolder=Directory.GetCurrentDirectory();
36-
while(Path.GetFileName(folder)!="src")
37+
stringfolder=typeof(TestPythonTests).Assembly.Location;
38+
while(Path.GetFileName(folder)!="src")
3739
{
3840
folder=Path.GetDirectoryName(folder);
3941
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp