This repository has been archived by the owner on May 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add helper to determine zope.app.testing usability.
While z3c.testsetup can work also without zope.app.testing installed, it runs into trouble when z.a.testing is installed but not in a usable state. This is the case with Python 3.x at the moment: you can install it, but it will be broken. Therefore we need a way to determine clearly (in tests and code) whether we can import *and use* zope.app.testing. The new function is meant for that purpose.
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
""" Tests for `z3c.testsetup.util`. | ||
Most of `z3c.testsetup.util` helper functions are tested in doctest | ||
files called ``util.txt`` (yes, there are two of them). As this kind of | ||
doctesting is a hell to debug and (in times of Sphinx) even not very | ||
useful for documentation, we write down new tests in Python. | ||
""" | ||
import unittest | ||
from z3c.testsetup.util import got_working_zope_app_testing | ||
|
||
|
||
class TestUtil(unittest.TestCase): | ||
|
||
def test_got_working_zope_app_testing(self): | ||
# we can generally determine whether zope.app.testing is useable | ||
result = got_working_zope_app_testing() | ||
assert (result is True) or (result is False) |
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