-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert self.fail(…) to pytest.fail(…) (#75)
Fix #39. --------- Co-authored-by: Bruno Oliveira <[email protected]>
- Loading branch information
1 parent
82d7ab7
commit ebdf341
Showing
4 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# required-method: fail | ||
|
||
class TestAssertTrue(TestCase): | ||
def test_me(self): | ||
self.fail(xxx+y) | ||
self.fail(aaa % bbb) | ||
self.fail(ccc or ddd) | ||
|
||
def test_everybody(self): | ||
self.fail( 'abc' ) | ||
|
||
def test_message(self): | ||
self.fail(msg='This is wrong!') | ||
self.fail(error_message) | ||
|
||
def test_nothing(self): | ||
self.fail() | ||
self.fail(self.fail()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# required-method: fail | ||
|
||
import pytest | ||
class TestAssertTrue(TestCase): | ||
def test_me(self): | ||
pytest.fail(xxx+y) | ||
pytest.fail(aaa % bbb) | ||
pytest.fail(ccc or ddd) | ||
|
||
def test_everybody(self): | ||
pytest.fail( 'abc' ) | ||
|
||
def test_message(self): | ||
pytest.fail(msg='This is wrong!') | ||
pytest.fail(error_message) | ||
|
||
def test_nothing(self): | ||
pytest.fail() | ||
pytest.fail(pytest.fail()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters