From 28b4977f0b26c35ec27aba22097ef895bd779e79 Mon Sep 17 00:00:00 2001 From: Sylvain Viollon Date: Tue, 12 Jan 2016 17:22:18 +0100 Subject: [PATCH 1/2] Update tests. --- setup.py | 2 +- src/grokcore/site/ftests/site/site.py | 2 +- .../site/ftests/test_grok_functional.py | 6 +++--- src/grokcore/site/tests/test_grok.py | 21 +++++++++++-------- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/setup.py b/setup.py index f414236..2fa8d47 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ from setuptools import setup, find_packages import os + def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() @@ -14,7 +15,6 @@ def read(*rnames): 'zope.app.appsetup', 'zope.component', 'zope.configuration', - 'zope.location', 'zope.testing', 'grokcore.content', ] diff --git a/src/grokcore/site/ftests/site/site.py b/src/grokcore/site/ftests/site/site.py index a7fc795..94b1bc5 100644 --- a/src/grokcore/site/ftests/site/site.py +++ b/src/grokcore/site/ftests/site/site.py @@ -3,7 +3,7 @@ grok.Container. >>> from zope import interface - >>> from zope.location.interfaces import IPossibleSite, ISite + >>> from zope.component.interfaces import IPossibleSite, ISite >>> manfred = Mammoth() >>> IPossibleSite.providedBy(manfred) True diff --git a/src/grokcore/site/ftests/test_grok_functional.py b/src/grokcore/site/ftests/test_grok_functional.py index 569a89a..055627a 100644 --- a/src/grokcore/site/ftests/test_grok_functional.py +++ b/src/grokcore/site/ftests/test_grok_functional.py @@ -1,9 +1,9 @@ +import doctest import unittest -import grokcore.site - from pkg_resources import resource_listdir -from zope.testing import doctest + from zope.app.appsetup.testlayer import ZODBLayer +import grokcore.site FunctionalLayer = ZODBLayer(grokcore.site) diff --git a/src/grokcore/site/tests/test_grok.py b/src/grokcore/site/tests/test_grok.py index 5a1ed33..fa56bae 100644 --- a/src/grokcore/site/tests/test_grok.py +++ b/src/grokcore/site/tests/test_grok.py @@ -1,15 +1,18 @@ +import doctest import re import unittest from pkg_resources import resource_listdir -from zope.testing import doctest, cleanup, renormalizing + +from zope.testing import cleanup, renormalizing import zope.component.eventtesting checker = renormalizing.RENormalizing([ # str(Exception) has changed from Python 2.4 to 2.5 (due to # Exception now being a new-style class). This changes the way # exceptions appear in traceback printouts. - (re.compile(r"ConfigurationExecutionError: :"), - r'ConfigurationExecutionError: \1:')]) + (re.compile( + r"ConfigurationExecutionError: :"), + r'ConfigurationExecutionError: \1:')]) def setUpZope(test): @@ -32,12 +35,12 @@ def suiteFromPackage(name): continue dottedname = 'grokcore.site.tests.%s.%s' % (name, filename[:-3]) - test = doctest.DocTestSuite(dottedname, - setUp=setUpZope, - tearDown=cleanUpZope, - checker=checker, - optionflags=doctest.ELLIPSIS + - doctest.NORMALIZE_WHITESPACE) + test = doctest.DocTestSuite( + dottedname, + setUp=setUpZope, + tearDown=cleanUpZope, + checker=checker, + optionflags=doctest.ELLIPSIS + doctest.NORMALIZE_WHITESPACE) suite.addTest(test) return suite From f7ce19784dad0e177b6a0e634ba089040cafc94e Mon Sep 17 00:00:00 2001 From: Sylvain Viollon Date: Fri, 29 Jan 2016 14:23:19 +0100 Subject: [PATCH 2/2] Update CHANGES.txt, travis.yml, MANIFEST.in. --- .travis.yml | 1 + CHANGES.txt | 2 +- MANIFEST.in | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index dce0257..c0929a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: python python: + - 2.6 - 2.7 install: - python bootstrap.py diff --git a/CHANGES.txt b/CHANGES.txt index 479b6bc..f89254a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,7 +4,7 @@ Changes 1.8 (unreleased) ---------------- -- Nothing changed yet. +- Update tests. 1.7 (2015-06-11) diff --git a/MANIFEST.in b/MANIFEST.in index 9e442f0..b67296b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,7 @@ -include *.txt *.py -recursive-include src *.* +global-include *.mo +include *.txt +include *.rst +include bootstrap.py +include buildout.cfg +include .travis.yml +recursive-include src *.py *.zcml