Added setup.py to allow automated testing.

Also moved the tests directory to top-level, as they shouldn't be part
of the pillar directory.
This commit is contained in:
Sybren A. Stüvel 2016-03-23 12:01:54 +01:00
parent 1769f20620
commit ebcb6bc5f8
4 changed files with 21 additions and 1 deletions

4
.gitignore vendored
View File

@ -3,9 +3,13 @@
*.pyc *.pyc
*.sublime* *.sublime*
*.ropeproject* *.ropeproject*
*.swp
config.py config.py
.ropeproject/* .ropeproject/*
pillar/application/static/storage/ pillar/application/static/storage/
/build
/.cache
/pillar/pillar.egg-info/

14
setup.py Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env python
"""Setup file for testing, not for packaging/distribution."""
import setuptools
setuptools.setup(
name='pillar',
version='1.0',
packages=setuptools.find_packages('pillar', exclude=['manage']),
package_dir={'': 'pillar'}, # tell setuptools packages are under src
tests_require=['pytest', 'httpretty'],
zip_safe=False,
)

View File

@ -10,7 +10,9 @@ TEST_EMAIL_ADDRESS = '%s@testing.blender.org' % TEST_EMAIL_USER
os.environ['BLENDER_ID_ENDPOINT'] = BLENDER_ID_ENDPOINT os.environ['BLENDER_ID_ENDPOINT'] = BLENDER_ID_ENDPOINT
os.environ['MONGO_DBNAME'] = 'unittest' os.environ['MONGO_DBNAME'] = 'unittest'
os.environ['EVE_SETTINGS'] = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'settings.py') os.environ['EVE_SETTINGS'] = os.path.join(
os.path.dirname(os.path.dirname(__file__)),
'pillar', 'settings.py')
from application import app from application import app
from application.utils import authentication as auth from application.utils import authentication as auth