|
|
|
@ -11,7 +11,7 @@ public class PyRunnerTests
|
|
|
|
|
private static readonly PyRunner PyRunner = new(); |
|
|
|
|
|
|
|
|
|
[ClassInitialize] |
|
|
|
|
public static async Task TestInitialize(TestContext testContext) |
|
|
|
|
public static void TestInitialize(TestContext testContext) |
|
|
|
|
{ |
|
|
|
|
var settingsManager = new SettingsManager(); |
|
|
|
|
if (!settingsManager.TryFindLibrary()) |
|
|
|
@ -19,19 +19,21 @@ public class PyRunnerTests
|
|
|
|
|
GlobalConfig.LibraryDir = GlobalConfig.HomeDir; |
|
|
|
|
PyRunner.HomeDir = GlobalConfig.HomeDir; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
await PyRunner.Initialize(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[Ignore] |
|
|
|
|
[TestMethod] |
|
|
|
|
public void PythonEngine_ShouldBeInitialized() |
|
|
|
|
public async Task PythonEngine_ShouldBeInitialized() |
|
|
|
|
{ |
|
|
|
|
await PyRunner.Initialize(); |
|
|
|
|
Assert.IsTrue(PythonEngine.IsInitialized); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[Ignore] |
|
|
|
|
[TestMethod] |
|
|
|
|
public async Task RunEval_ShouldReturnOutput() |
|
|
|
|
{ |
|
|
|
|
await PyRunner.Initialize(); |
|
|
|
|
// Arrange |
|
|
|
|
const string script = "print('Hello World')"; |
|
|
|
|
|
|
|
|
|