|
1 | 1 | usingSystem;
|
2 |
| -usingSystem.Reflection; |
3 |
| -usingSystem.Collections.Generic; |
| 2 | +usingSystem.IO; |
4 | 3 | usingNUnit.Framework;
|
5 | 4 | usingPython.Runtime;
|
6 |
| -usingSystem.IO; |
7 | 5 |
|
8 | 6 | namespacePython.EmbeddingTest
|
9 | 7 | {
|
@@ -52,10 +50,18 @@ public void TearDown()
|
52 | 50 | [Test]
|
53 | 51 | publicvoidTestDottedName()
|
54 | 52 | {
|
55 |
| -PyObjectmodule1=PythonEngine.ImportModule("PyImportTest.test.one"); |
56 |
| -Assert.IsNotNull(module1,">>> import PyImportTest.test.one # FAILED"); |
57 |
| -PyObjectmodule2=PythonEngine.ImportModule("PyImportTest.sysargv"); |
58 |
| -Assert.IsNotNull(module2,">>> import PyImportTest.sysargv # FAILED"); |
| 53 | +PyObjectmodule=PythonEngine.ImportModule("PyImportTest.test.one"); |
| 54 | +Assert.IsNotNull(module,">>> import PyImportTest.test.one # FAILED"); |
| 55 | +} |
| 56 | + |
| 57 | +/// <summary> |
| 58 | +/// Tests that sys.args is set. If it wasn't exception would be raised. |
| 59 | +/// </summary> |
| 60 | +[Test] |
| 61 | +publicvoidTestSysArgsImportException() |
| 62 | +{ |
| 63 | +PyObjectmodule=PythonEngine.ImportModule("PyImportTest.sysargv"); |
| 64 | +Assert.IsNotNull(module,">>> import PyImportTest.sysargv # FAILED"); |
59 | 65 | }
|
60 | 66 | }
|
61 | 67 | }
|