Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for skipping or expecting failure on a test #17

Merged
merged 2 commits into from
Feb 11, 2015

Conversation

cdent
Copy link
Owner

@cdent cdent commented Feb 10, 2015

This is needed because during the test writing process there
are often many things that ought to succeed but don't that are
beyond the scope of the immediate project. For example a framework
not properly returning a 405 when a method is not allowed, or
returning 405 but then not returning the Allow header.

This feature required switching the base test case from unittest to
testtools. The former has changed (in Python 3.4) the internals of how
expecting failure is handled and as a result making it work with
dynamically generated tests was proving extremely difficult.

An additional shell driven test is provided for coverage of
skip and fail.

This is needed because during the test writing process there
are often _many_ things that ought to succeed but don't that are
beyond the scope of the immediate project. For example a framework
not properly returning a 405 when a method is not allowed, or
returning 405 but then not returning the Allow header.

This feature required switching the base test case from unittest to
testtools. The former has changed (in Python 3.4) the internals of how
expecting failure is handled and as a result making it work with
dynamically generated tests was proving extremely difficult.

An additional shell driven test is provided for coverage of
skip and fail.
@cdent
Copy link
Owner Author

cdent commented Feb 10, 2015

@FND if you've got a moment a sanity check on this would be helpful, but no worries if not.

@@ -13,23 +13,40 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""A single HTTP request reprensented as a ``unittest.TestCase``
"""A single HTTP request reprensented as a subclass of ``unittest.TestCase``
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "represented"

@FND
Copy link
Collaborator

FND commented Feb 11, 2015

seems sensible to me - though of course I lack familiarity to provide a truly informed assessment

(I was confused when yesterday I said "shouldn't the testing framework be responsible for this"; I was thinking of pytest -x)

cdent added a commit that referenced this pull request Feb 11, 2015
Add support for skipping or expecting failure on a test
@cdent cdent merged commit aba30a5 into master Feb 11, 2015
@cdent cdent deleted the skip-or-fail-feature branch April 7, 2015 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants