-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #335 from bukzor/systemexit-test
fixed exception handling for SystemExit and KeyboardInterrupt, and tests
- Loading branch information
Showing
17 changed files
with
85 additions
and
35 deletions.
There are no files selected for viewing
Empty file.
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,2 @@ | ||
""""this example throws KeyboardInterrupt during discovery""" | ||
raise KeyboardInterrupt('fake!') |
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,13 @@ | ||
"""this example throws KeyboardInterrupt during fixture setup""" | ||
import testify as T | ||
|
||
|
||
class Test(T.TestCase): | ||
def setUp(self): | ||
raise KeyboardInterrupt('fake!') | ||
|
||
def test1(self): | ||
pass | ||
|
||
def test2(self): | ||
pass |
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,15 @@ | ||
"""this example throws KeyboardInterrupt during fixture teardown""" | ||
import testify as T | ||
|
||
|
||
class Test(T.TestCase): | ||
@T.setup_teardown | ||
def fixture(self): | ||
yield | ||
raise KeyboardInterrupt('fake!') | ||
|
||
def test1(self): | ||
pass | ||
|
||
def test2(self): | ||
pass |
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,10 @@ | ||
"""this example throws KeyboardInterrupt during testing""" | ||
import testify as T | ||
|
||
|
||
class Test(T.TestCase): | ||
def test1(self): | ||
raise KeyboardInterrupt('fake!') | ||
|
||
def test2(self): | ||
raise KeyboardInterrupt('fake!') |
Empty file.
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,3 @@ | ||
""""this example throws SystemExit during discovery""" | ||
import sys | ||
sys.exit('fake!') |
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,8 @@ | ||
"""this example throws SystemExit during testing""" | ||
import testify as T | ||
import sys | ||
|
||
|
||
class Test(T.TestCase): | ||
def test(self): | ||
sys.exit('fake!') |
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 was deleted.
Oops, something went wrong.
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,14 @@ | ||
class Testify(Exception): | ||
pass | ||
|
||
|
||
class TestifyError(Testify): | ||
pass | ||
|
||
|
||
class DiscoveryError(TestifyError): | ||
pass | ||
|
||
|
||
class Interruption(Testify): | ||
pass |
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
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
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