8000 fixed MacOS bad assembly test by using PythonDLL (which is never a .N… · quantfns/pythonnet@f09a48b · GitHub
[go: up one dir, main page]

Skip to content

Commit f09a48b

Browse files
committed
fixed MacOS bad assembly test by using PythonDLL (which is never a .NET assembly)
1 parent b614dba commit f09a48
8000
b

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

src/embed_tests/pyimport.cs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,24 +83,13 @@ public void TestCastGlobalVar()
8383
[Test]
8484
public void BadAssembly()
8585
{
86-
string path;
86+
string path = Runtime.Runtime.PythonDLL;
8787
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
8888
{
8989
path = @"C:\Windows\System32\kernel32.dll";
9090
}
91-
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
92-
{
93-
path = "/usr/lib/libc.dylib";
94-
}
95-
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
96-
{
97-
path = "/usr/lib/locale/locale-archive";
98-
}
99-
else
100-
{
101-
Assert.Pass("TODO: add bad assembly location for other platforms");
102-
return;
103-
}
91+
92+
Assert.IsTrue(File.Exists(path), $"Test DLL {path} does not exist!");
10493

10594
string code = $@"
10695
import clr

0 commit comments

Comments
 (0)
0