Review replacing expectedFailure decorator with assertRaisesRegex
- Dominant language
- Python
- Stars
- 7
- Forks
- 10
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 5
Description
# ✨ Feature Request
Currently we make use of the @unittest.expectedFailure decorator rather than, say, [assertRaisesRegex](https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertRaisesRegex), which would allow the exception message to be checked (It looks like there is no option to do this with [expectedFailure](https://docs.python.org/3/library/unittest.html#unittest.expectedFailure)?)
There are currently 11 xfailed tests, so there are only 11 tests that would need updating.
## Requirements
Expected failures to be captured explicitly.
## Context
Simplifying the unittesting so expectedFailures are testing for known, expected, failures.
Contributor guide
Research direction
Search the test suite for the 11 uses of unittest.expectedFailure and inspect each expected failure before changing it. Replace the implicit expected-failure handling with explicit exception assertions that check the message, then run the relevant tests and the full test suite to confirm all expected failures are captured explicitly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100