Commits

Jan-Jaap Driessen committed 0f37c28

Add tox for cross python testing. Hack to get tox to pick up the 'mypackage' fixture.

  • Participants
  • Parent commits 64a10e5

Comments (0)

Files changed (13)

 *.swp
 *~
 develop-eggs
-dist
+./dist
 doc/_build
 eggs
 .coverage
 htmlcov
-
+.tox

File buildout.cfg

 [buildout]
-develop = . fixtures/MyPackage
+develop = . fixtures/mypackage
 parts = py.test releaser devpython sphinxpython sphinxbuilder pyflakes
 versions = versions
 unzip = true

File fixtures/MyPackage/MANIFEST.in

-recursive-include src *

File fixtures/MyPackage/setup.py

-from setuptools import setup, find_packages
-
-setup(name='mypackage',
-      version='1.0dev',
-      include_package_data=True,
-      zip_safe=False,
-      package_dir={'': 'src'},
-      packages=find_packages('src'),
-      install_requires=['setuptools', 'fanstatic'],
-      entry_points={
-          'fanstatic.libraries': [
-              'foo = mypackage:foo',
-          ]
-      })

File fixtures/MyPackage/src/mypackage/__init__.py

-from fanstatic import Library, Resource
-
-foo = Library('foo', 'resources')
-
-style = Resource(foo, 'style.css')

File fixtures/MyPackage/src/mypackage/resources/style.css

-body {
-  color: #f00;
-}

File fixtures/mypackage/MANIFEST.in

+recursive-include src *

File fixtures/mypackage/dist/mypackage-1.0.tar.gz

Binary file added.

File fixtures/mypackage/index.html

+<a href="dist/mypackage-1.0.tar.gz">mypackage-1.0.tar.gz</a>

File fixtures/mypackage/setup.py

+from setuptools import setup, find_packages
+
+setup(name='mypackage',
+      version='1.0',
+      include_package_data=True,
+      zip_safe=False,
+      package_dir={'': 'src'},
+      packages=find_packages('src'),
+      install_requires=['setuptools', 'fanstatic'],
+      entry_points={
+          'fanstatic.libraries': [
+              'foo = mypackage:foo',
+          ]
+      })

File fixtures/mypackage/src/mypackage/__init__.py

+from fanstatic import Library, Resource
+
+foo = Library('foo', 'resources')
+
+style = Resource(foo, 'style.css')

File fixtures/mypackage/src/mypackage/resources/style.css

+body {
+  color: #f00;
+}
+[tox]
+envlist = py27
+indexserver =
+    FIXTURES = file://{toxinidir}/fixtures/
+
+[testenv]
+deps =
+  fanstatic
+# Hack to install a local fixture for the test run.
+  :FIXTURES:mypackage
+  pytest
+commands = python setup.py test