Re: Marking a subtest as an expected failure

2016-06-21 Thread Ben Finney
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

2016-06-21 Thread Steven D'Aprano
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