File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Reflection ;
3
- using System . Collections . Generic ;
2
+ using System . IO ;
4
3
using NUnit . Framework ;
5
4
using Python . Runtime ;
6
- using System . IO ;
7
5
8
6
namespace Python . EmbeddingTest
9
7
{
@@ -52,10 +50,18 @@ public void TearDown()
52
50
[ Test ]
53
51
public void TestDottedName ( )
54
52
{
55
- PyObject module1 = PythonEngine . ImportModule ( "PyImportTest.test.one" ) ;
56
- Assert . IsNotNull ( module1 , ">>> import PyImportTest.test.one # FAILED" ) ;
57
- PyObject module2 = PythonEngine . ImportModule ( "PyImportTest.sysargv" ) ;
58
8D67
- Assert . IsNotNull ( module2 , ">>> import PyImportTest.sysargv # FAILED" ) ;
53
+ PyObject module = 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
+ public void TestSysArgsImportException ( )
62
+ {
63
+ PyObject module = PythonEngine . ImportModule ( "PyImportTest.sysargv" ) ;
64
+ Assert . IsNotNull ( module , ">>> import PyImportTest.sysargv # FAILED" ) ;
59
65
}
60
66
}
61
67
}
You can’t perform that action at this time.
0 commit comments