(self, pytester: Pytester)
| 178 | |
| 179 | class TestNewSession(SessionTests): |
| 180 | def test_order_of_execution(self, pytester: Pytester) -> None: |
| 181 | reprec = pytester.inline_runsource( |
| 182 | """ |
| 183 | values = [] |
| 184 | def test_1(): |
| 185 | values.append(1) |
| 186 | def test_2(): |
| 187 | values.append(2) |
| 188 | def test_3(): |
| 189 | assert values == [1,2] |
| 190 | class Testmygroup(object): |
| 191 | reslist = values |
| 192 | def test_1(self): |
| 193 | self.reslist.append(1) |
| 194 | def test_2(self): |
| 195 | self.reslist.append(2) |
| 196 | def test_3(self): |
| 197 | self.reslist.append(3) |
| 198 | def test_4(self): |
| 199 | assert self.reslist == [1,2,1,2,3] |
| 200 | """ |
| 201 | ) |
| 202 | passed, skipped, failed = reprec.countoutcomes() |
| 203 | assert failed == skipped == 0 |
| 204 | assert passed == 7 |
| 205 | |
| 206 | def test_collect_only_with_various_situations(self, pytester: Pytester) -> None: |
| 207 | p = pytester.makepyfile( |
nothing calls this directly
no test coverage detected