@@ -82,9 +82,9 @@ suite('Unit Tests (nosetest)', () => {
8282 ] ;
8383 testManager = new nose . TestManager ( UNITTEST_SINGLE_TEST_FILE_PATH , outChannel ) ;
8484 testManager . discoverTests ( true , true ) . then ( tests => {
85- assert . equal ( tests . testFiles . length , 1 , 'Incorrect number of test files' ) ;
86- assert . equal ( tests . testFunctions . length , 3 , 'Incorrect number of test functions' ) ;
87- assert . equal ( tests . testSuits . length , 1 , 'Incorrect number of test suites' ) ;
85+ assert . equal ( tests . testFiles . length , 2 , 'Incorrect number of test files' ) ;
86+ assert . equal ( tests . testFunctions . length , 6 , 'Incorrect number of test functions' ) ;
87+ assert . equal ( tests . testSuits . length , 2 , 'Incorrect number of test suites' ) ;
8888 assert . equal ( tests . testFiles . some ( t => t . name === 'tests/test_one.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
8989 } ) . then ( done ) . catch ( done ) ;
9090 } ) ;
@@ -95,14 +95,15 @@ suite('Unit Tests (nosetest)', () => {
9595 ] ;
9696 createTestManager ( ) ;
9797 testManager . discoverTests ( true , true ) . then ( tests => {
98- assert . equal ( tests . testFiles . length , 5 , 'Incorrect number of test files' ) ;
99- assert . equal ( tests . testFunctions . length , 19 , 'Incorrect number of test functions' ) ;
100- assert . equal ( tests . testSuits . length , 5 , 'Incorrect number of test suites' ) ;
98+ assert . equal ( tests . testFiles . length , 6 , 'Incorrect number of test files' ) ;
99+ assert . equal ( tests . testFunctions . length , 22 , 'Incorrect number of test functions' ) ;
100+ assert . equal ( tests . testSuits . length , 6 , 'Incorrect number of test suites' ) ;
101101 assert . equal ( tests . testFiles . some ( t => t . name === 'tests/test_unittest_one.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
102102 assert . equal ( tests . testFiles . some ( t => t . name === 'tests/test_unittest_two.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
103103 assert . equal ( tests . testFiles . some ( t => t . name === 'tests/test_pytest.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
104104 assert . equal ( tests . testFiles . some ( t => t . name === 'tests/test_another_pytest.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
105105 assert . equal ( tests . testFiles . some ( t => t . name === 'tests/unittest_three_test.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
106+ assert . equal ( tests . testFiles . some ( t => t . name === 'test_root.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
106107 } ) . then ( done ) . catch ( done ) ;
107108 } ) ;
108109
@@ -112,14 +113,15 @@ suite('Unit Tests (nosetest)', () => {
112113 ] ;
113114 createTestManager ( ) ;
114115 testManager . discoverTests ( true , true ) . then ( tests => {
115- assert . equal ( tests . testFiles . length , 5 , 'Incorrect number of test files' ) ;
116- assert . equal ( tests . testFunctions . length , 15 , 'Incorrect number of test functions' ) ;
117- assert . equal ( tests . testSuits . length , 4 , 'Incorrect number of test suites' ) ;
116+ assert . equal ( tests . testFiles . length , 6 , 'Incorrect number of test files' ) ;
117+ assert . equal ( tests . testFunctions . length , 18 , 'Incorrect number of test functions' ) ;
118+ assert . equal ( tests . testSuits . length , 5 , 'Incorrect number of test suites' ) ;
118119 assert . equal ( tests . testFiles . some ( t => t . name === 'tests/test_unittest_one.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
119120 assert . equal ( tests . testFiles . some ( t => t . name === 'tests/test_unittest_two.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
120121 assert . equal ( tests . testFiles . some ( t => t . name === 'tests/test_pytest.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
121122 assert . equal ( tests . testFiles . some ( t => t . name === 'tests/test_another_pytest.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
122123 assert . equal ( tests . testFiles . some ( t => t . name === 'tests/unittest_three_test.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
124+ assert . equal ( tests . testFiles . some ( t => t . name === 'test_root.py' && t . nameToRun === t . name ) , true , 'Test File not found' ) ;
123125 } ) . then ( done ) . catch ( done ) ;
124126 } ) ;
125127
@@ -129,9 +131,9 @@ suite('Unit Tests (nosetest)', () => {
129131 createTestManager ( ) ;
130132 testManager . runTest ( ) . then ( results => {
131133 assert . equal ( results . summary . errors , 5 , 'Errors' ) ;
132- assert . equal ( results . summary . failures , 5 , 'Failures' ) ;
133- assert . equal ( results . summary . passed , 7 , 'Passed' ) ;
134- assert . equal ( results . summary . skipped , 2 , 'skipped' ) ;
134+ assert . equal ( results . summary . failures , 6 , 'Failures' ) ;
135+ assert . equal ( results . summary . passed , 8 , 'Passed' ) ;
136+ assert . equal ( results . summary . skipped , 3 , 'skipped' ) ;
135137 } ) . then ( done ) . catch ( done ) ;
136138 } ) ;
137139
@@ -141,15 +143,15 @@ suite('Unit Tests (nosetest)', () => {
141143 createTestManager ( ) ;
142144 testManager . runTest ( ) . then ( results => {
143145 assert . equal ( results . summary . errors , 5 , 'Errors' ) ;
144- assert . equal ( results . summary . failures , 5 , 'Failures' ) ;
145- assert . equal ( results . summary . passed , 7 , 'Passed' ) ;
146- assert . equal ( results . summary . skipped , 2 , 'skipped' ) ;
146+ assert . equal ( results . summary . failures , 6 , 'Failures' ) ;
147+ assert . equal ( results . summary . passed , 8 , 'Passed' ) ;
148+ assert . equal ( results . summary . skipped , 3 , 'skipped' ) ;
147149
148150 return testManager . runTest ( true ) . then ( tests => {
149- assert . equal ( results . summary . errors , 5 , 'Errors' ) ;
150- assert . equal ( results . summary . failures , 5 , 'Failures' ) ;
151- assert . equal ( results . summary . passed , 0 , 'Passed' ) ;
152- assert . equal ( results . summary . skipped , 0 , 'skipped' ) ;
151+ assert . equal ( results . summary . errors , 5 , 'Errors again ' ) ;
152+ assert . equal ( results . summary . failures , 6 , 'Failures again ' ) ;
153+ assert . equal ( results . summary . passed , 0 , 'Passed again ' ) ;
154+ assert . equal ( results . summary . skipped , 0 , 'skipped again ' ) ;
153155 } ) ;
154156 } ) . then ( done ) . catch ( done ) ;
155157 } ) ;
@@ -161,10 +163,10 @@ suite('Unit Tests (nosetest)', () => {
161163 testManager . discoverTests ( true , true ) . then ( tests => {
162164 const testFile : TestsToRun = { testFile : [ tests . testFiles [ 0 ] ] , testFolder : [ ] , testFunction : [ ] , testSuite : [ ] } ;
163165 return testManager . runTest ( testFile ) . then ( tests => {
164- assert . equal ( tests . summary . errors , 2 , 'Errors' ) ;
165- assert . equal ( tests . summary . failures , 0 , 'Failures' ) ;
166- assert . equal ( tests . summary . passed , 0 , 'Passed' ) ;
167- assert . equal ( tests . summary . skipped , 0 , 'skipped' ) ;
166+ assert . equal ( tests . summary . errors , 0 , 'Errors' ) ;
167+ assert . equal ( tests . summary . failures , 1 , 'Failures' ) ;
168+ assert . equal ( tests . summary . passed , 1 , 'Passed' ) ;
169+ assert . equal ( tests . summary . skipped , 1 , 'skipped' ) ;
168170 } ) ;
169171 } ) . then ( done ) . catch ( done ) ;
170172 } ) ;
@@ -191,8 +193,8 @@ suite('Unit Tests (nosetest)', () => {
191193 testManager . discoverTests ( true , true ) . then ( tests => {
192194 const testFn : TestsToRun = { testFile : [ ] , testFolder : [ ] , testFunction : [ tests . testFunctions [ 0 ] . testFunction ] , testSuite : [ ] } ;
193195 return testManager . runTest ( testFn ) . then ( tests => {
194- assert . equal ( tests . summary . errors , 1 , 'Errors' ) ;
195- assert . equal ( tests . summary . failures , 0 , 'Failures' ) ;
196+ assert . equal ( tests . summary . errors , 0 , 'Errors' ) ;
197+ assert . equal ( tests . summary . failures , 1 , 'Failures' ) ;
196198 assert . equal ( tests . summary . passed , 0 , 'Passed' ) ;
197199 assert . equal ( tests . summary . skipped , 0 , 'skipped' ) ;
198200 } ) ;
0 commit comments