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 11using System ;
2- using System . Reflection ;
3- using System . Collections . Generic ;
2+ using System . IO ;
43using NUnit . Framework ;
54using Python . Runtime ;
6- using System . IO ;
75
86namespace Python . EmbeddingTest
97{
@@ -52,10 +50,18 @@ public void TearDown()
5250 [ Test ]
5351 public void TestDottedName ( )
5452 {
55- PyObject module1 = PythonEngine . ImportModule ( "PyImportTest.test.one" ) ;
56- Assert . IsNotNull ( module1 , ">>> import PyImportTest.test.one # FAILED" ) ;
57
8000
- PyObject module2 = PythonEngine . ImportModule ( "PyImportTest.sysargv" ) ;
58- 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" ) ;
5965 }
6066 }
6167}
You can’t perform that action at this time.
0 commit comments