Last active
October 22, 2016 03:10
-
-
Save juliomfreitas/b06d92983d7697a746696613e6e36771 to your computer and use it in GitHub Desktop.
Revisions
-
juliomfreitas revised this gist
Oct 22, 2016 . 1 changed file with 9 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -14,5 +14,12 @@ def run(self, result=None): class BinaryBoolOperationTests(NotImplementedToExpectedFailure): not_implemented = [ 'test_add_class' ] def test_add_class(self): pass def test_add_complex(self): pass
-
juliomfreitas revised this gist
Oct 22, 2016 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,3 +10,9 @@ def run(self, result=None): wrapper.__unittest_expecting_failure__ = True setattr(self, self._testMethodName, wrapper) return super().run(result=result) class BinaryBoolOperationTests(NotImplementedToExpectedFailure): not_implemented = [ 'test_add_class', ] -
juliomfreitas renamed this gist
Oct 22, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
juliomfreitas created this gist
Oct 22, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ class NotImplementedToExpectedFailure: def run(self, result=None): # Override the run method to inject the "expectingFailure" marker # when the test case runs. if self._testMethodName in getattr(self, 'not_implemented', []): # Mark 'expecting failure' on class. It will only be applicable # for this specific run. method = getattr(self, self._testMethodName) wrapper = lambda *args, **kwargs: method(*args, **kwargs) wrapper.__unittest_expecting_failure__ = True setattr(self, self._testMethodName, wrapper) return super().run(result=result)