-
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.
Modernize project: - Remove zope.app.zcmlfiles and zope.app.testing deps, among others. - tox.ini - .travis.yml uses pip, zope.testrunner and supports caching and coverage - Rename .txt -> .rst
- Loading branch information
Showing
18 changed files
with
248 additions
and
95 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,7 @@ | ||
[run] | ||
source = src | ||
|
||
[report] | ||
exclude_lines = | ||
pragma: no cover | ||
if __name__ == '__main__': |
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 |
---|---|---|
|
@@ -9,3 +9,5 @@ build/ | |
dist/ | ||
*.egg-info/ | ||
.tox/ | ||
htmlcov/ | ||
.coverage |
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,9 +1,26 @@ | ||
language: python | ||
sudo: false | ||
python: | ||
- 2.7 | ||
install: | ||
- pip install . | ||
- 2.7 | ||
- 3.4 | ||
- 3.5 | ||
- 3.6 | ||
- pypy-5.4.1 | ||
script: | ||
- python setup.py test -q | ||
- coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress | ||
|
||
after_success: | ||
- coveralls | ||
notifications: | ||
email: false | ||
email: false | ||
|
||
install: | ||
- pip install -U pip setuptools | ||
- pip install -U coveralls coverage | ||
- pip install -U -e ".[test]" | ||
|
||
|
||
cache: pip | ||
|
||
before_cache: | ||
- rm -f $HOME/.cache/pip/log/debug.log |
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,6 +1,11 @@ | ||
include *.py | ||
include *.txt | ||
include *.rst | ||
include buildout.cfg | ||
include tox.ini | ||
include .travis.yml | ||
include .coveragerc | ||
|
||
recursive-include src *.pt | ||
recursive-include src *.txt | ||
recursive-include src *.rst | ||
recursive-include src *.zcml |
File renamed without changes.
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 @@ | ||
# this is a namespace package | ||
try: | ||
import pkg_resources | ||
pkg_resources.declare_namespace(__name__) | ||
except ImportError: | ||
import pkgutil | ||
__path__ = pkgutil.extend_path(__path__, __name__) | ||
|
||
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover |
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 @@ | ||
# this is a namespace package | ||
try: | ||
import pkg_resources | ||
pkg_resources.declare_namespace(__name__) | ||
except ImportError: | ||
import pkgutil | ||
__path__ = pkgutil.extend_path(__path__, __name__) | ||
|
||
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover |
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 +1,22 @@ | ||
# empty __init__.py file to make this directory into a package | ||
|
||
import unittest | ||
|
||
from webtest import TestApp | ||
|
||
|
||
|
||
class BrowserTestCase(unittest.TestCase): | ||
|
||
layer = None | ||
|
||
def setUp(self): | ||
super(BrowserTestCase, self).setUp() | ||
self._testapp = TestApp(self.layer.make_wsgi_app()) | ||
|
||
def publish(self, path, basic=None, headers=None, handle_errors=False): | ||
assert basic | ||
self._testapp.authorization = ('Basic', tuple(basic.split(':'))) | ||
env = {'wsgi.handleErrors': handle_errors} | ||
response = self._testapp.get(path, extra_environ=env, headers=headers, | ||
expect_errors=handle_errors) | ||
return response |
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
Oops, something went wrong.