diff options
Diffstat (limited to 'eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests')
-rw-r--r-- | eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/__init__.py | 0 | ||||
-rw-r--r-- | eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/__init__.pyo | bin | 0 -> 199 bytes | |||
-rw-r--r-- | eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/test_impl.py | 75 | ||||
-rw-r--r-- | eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/test_impl.pyo | bin | 0 -> 3349 bytes |
4 files changed, 75 insertions, 0 deletions
diff --git a/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/__init__.py b/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/__init__.py diff --git a/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/__init__.pyo b/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/__init__.pyo Binary files differnew file mode 100644 index 0000000..f5a5ae4 --- /dev/null +++ b/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/__init__.pyo diff --git a/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/test_impl.py b/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/test_impl.py new file mode 100644 index 0000000..55e6988 --- /dev/null +++ b/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/test_impl.py @@ -0,0 +1,75 @@ +## -*- coding: utf-8 -*- + +__author__ = "sylvain@infrae.com" +__format__ = "plaintext" +__version__ = "$Id: test_impl.py 31670 2008-10-31 10:21:14Z sylvain $" + +import doctest +import os +import os.path +import sys +import unittest +from doctest import DocFileSuite + +import py +import svnhelper.testing +import svnhelper.tests +import zc.buildout.testing +from svnhelper.core import helper + +import infrae.subversion + + +def setUp(test): + test_package = os.path.dirname(svnhelper.tests.__file__) + test_package = os.path.join(test_package, 'tests', 'my.testing') + tested_package = os.path.dirname(infrae.subversion.__file__) + + zc.buildout.testing.buildoutSetUp(test) + zc.buildout.testing.install('py', test) + zc.buildout.testing.install_develop('infrae.subversion', test) + svnhelper.testing.setUpRepository(test) + test.globs['init_test_package'](test_package) + helper.import_to(test_package, + test.globs['repository']) + helper.import_to(tested_package, + test.globs['repository'] + '/infrae.subversion/trunk/infrae.subversion') + +def tearDown(test): + svnhelper.testing.tearDownRepository(test) + zc.buildout.testing.buildoutTearDown(test) + +flags = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE | + doctest.REPORT_ONLY_FIRST_FAILURE | doctest.REPORT_NDIFF) + +def have_pysvn(): + impl = os.getenv('INFRAE_SUBVERSION_IMPL', 'PYSVN') + if impl == 'PYSVN': + try: + import pysvn + return True + except: + pass + return False + +def test_file(name): + return os.path.join(os.path.dirname(__file__), name) + +def test_suite(): + tests = [DocFileSuite(test_file('IMPL.txt'), + optionflags=flags, + globs=globals(), + setUp=setUp, + tearDown=tearDown, + module_relative=False)] + if have_pysvn(): + tests += [DocFileSuite(test_file('EXPORT.txt'), + optionflags=flags, + globs=globals(), + setUp=setUp, + tearDown=tearDown, + module_relative=False)] + return unittest.TestSuite(tests) + +if __name__ == '__main__': + unittest.main(defaultTest='test_suite') diff --git a/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/test_impl.pyo b/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/test_impl.pyo Binary files differnew file mode 100644 index 0000000..f30eecb --- /dev/null +++ b/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/tests/test_impl.pyo |