Re: Marking a subtest as an expected failure
Steven D'Aprano writes: > def test_spam(self): > for i in range(100): > for j in range(100): > with self.subtest(i=i, j=j): > if (i, j) != (97, 83): > self.assertEqual(spam(i, j), 999) > > > but is there a nicer way to mark a specific su
Marking a subtest as an expected failure
I'm using unittest and the subtest context manager to run some tests: def test_spam(self): for i in range(100): for j in range(100): with self.subtest(i=i, j=j): self.assertEqual(spam(i, j), 999) Now, it turns out that spam(i, j) == 999 for all i, j *exce