-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
presents test-runner with basic failure reporting
- Loading branch information
1 parent
21335b2
commit 48e8973
Showing
9 changed files
with
133 additions
and
56 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
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 |
---|---|---|
|
@@ -40,6 +40,7 @@ class Anything(object): | |
def __eq__(self, _): | ||
return True | ||
|
||
|
||
anything = Anything() | ||
|
||
|
||
|
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,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# <sure - utility belt for automated testing in python> | ||
# Copyright (C) <2010-2023> Gabriel Falcão <gabriel@nacaolivre.org> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
from __future__ import unicode_literals | ||
|
||
|
||
class NonValidTest(Exception): | ||
"""raised when a non-compatible test appears within the test-run session""" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
# -*- coding: utf-8 -*- | ||
from unittest import TestCase | ||
|
||
scenario = "test one" | ||
feature = "test sure runner" | ||
|
||
|
||
def test_assert(): | ||
"testing a simple assertion with sure runner" | ||
assert True | ||
# def test_function_ok(): | ||
# "testing successful function with sure runner" | ||
# assert True | ||
|
||
|
||
def test_function_fail(): | ||
"testing failing function with sure runner" | ||
assert False, 'the failure appears to be right' | ||
|
||
|
||
# class TestClass(TestCase): | ||
# "`sure' should work seamlessly with a unittest.TestCase" | ||
|
||
# def setUp(self): | ||
# self.one_attribute = { | ||
# 'question': 'does it work for us?' | ||
# } | ||
|
||
# def tearDown(self): | ||
# self.one_attribute.pop('question') | ||
|
||
# def test_expected_attribute_exists(self): | ||
# "the setUp should work in our favor or else everything is unambiguously lost" | ||
# assert hasattr(self, 'one_attribute'), f'{self} should have one_attribute but does not appear so' |