@@ -64,6 +64,16 @@ suite('Unit Tests (nosetest)', () => {
6464 assert . equal ( tests . testFiles . some ( t => t . name === path . join ( 'tests' , 'test_one.py' ) && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
6565 } ) ;
6666
67+ test ( 'Check that nameToRun in testSuits has class name after : (single test file)' , async ( ) => {
68+ pythonSettings . unitTest . nosetestArgs = [ ] ;
69+ testManager = new nose . TestManager ( UNITTEST_SINGLE_TEST_FILE_PATH , outChannel ) ;
70+ const tests = await testManager . discoverTests ( true , true ) ;
71+ assert . equal ( tests . testFiles . length , 2 , 'Incorrect number of test files' ) ;
72+ assert . equal ( tests . testFunctions . length , 6 , 'Incorrect number of test functions' ) ;
73+ assert . equal ( tests . testSuits . length , 2 , 'Incorrect number of test suites' ) ;
74+ assert . equal ( tests . testSuits . every ( t => t . testSuite . name === t . testSuite . nameToRun . split ( ":" ) [ 1 ] ) , true , 'Suite name does not match class name' ) ;
75+ } ) ;
76+
6777 test ( 'Discover Tests (pattern = test_)' , async ( ) => {
6878 pythonSettings . unitTest . nosetestArgs = [ ] ;
6979 createTestManager ( ) ;
@@ -140,10 +150,10 @@ suite('Unit Tests (nosetest)', () => {
140150 const tests = await testManager . discoverTests ( true , true ) ;
141151 const testSuite : TestsToRun = { testFile : [ ] , testFolder : [ ] , testFunction : [ ] , testSuite : [ tests . testSuits [ 0 ] . testSuite ] } ;
142152 const results = await testManager . runTest ( testSuite ) ;
143- assert . equal ( results . summary . errors , 1 , 'Errors' ) ;
144- assert . equal ( results . summary . failures , 0 , 'Failures' ) ;
145- assert . equal ( results . summary . passed , 0 , 'Passed' ) ;
146- assert . equal ( results . summary . skipped , 0 , 'skipped' ) ;
153+ assert . equal ( results . summary . errors , 0 , 'Errors' ) ;
154+ assert . equal ( results . summary . failures , 1 , 'Failures' ) ;
155+ assert . equal ( results . summary . passed , 1 , 'Passed' ) ;
156+ assert . equal ( results . summary . skipped , 1 , 'skipped' ) ;
147157 } ) ;
148158
149159 test ( 'Run Specific Test Function' , async ( ) => {
0 commit comments