Revision d4656036
vigiboard isolated test runner
git-svn-id: https://vigilo-dev.si.c-s.fr/svn@533 b22e2e97-25c9-44ff-b637-2e5ceca36478
setup.py | ||
---|---|---|
7 | 7 |
use_setuptools() |
8 | 8 |
from setuptools import setup, find_packages |
9 | 9 |
|
10 |
tests_require = ['WebTest', 'BeautifulSoup'] |
|
11 |
|
|
10 | 12 |
setup( |
11 | 13 |
name='vigiboard', |
12 | 14 |
version='0.1', |
... | ... | |
26 | 28 |
"psycopg2", |
27 | 29 |
"tw.jquery >= 0.9.5", |
28 | 30 |
"vigilo-models", |
31 |
"PasteScript >= 1.7", # setup_requires has issues |
|
29 | 32 |
"decorator != 3.1.0", # Blacklist bad version |
30 | 33 |
], |
31 |
setup_requires=["PasteScript >= 1.7"], |
|
32 | 34 |
paster_plugins=['PasteScript', 'Pylons', 'TurboGears2', 'tg.devtools'], |
33 | 35 |
packages=find_packages(exclude=['ez_setup']), |
34 | 36 |
include_package_data=True, |
35 | 37 |
test_suite='nose.collector', |
36 |
tests_require=['WebTest', 'BeautifulSoup'], |
|
38 |
tests_require=tests_require, |
|
39 |
extras_require={ |
|
40 |
'tests': tests_require, |
|
41 |
}, |
|
37 | 42 |
package_data={'vigiboard': ['i18n/*/LC_MESSAGES/*.mo', |
38 | 43 |
'templates/*/*', |
39 | 44 |
'public/*/*']}, |
... | ... | |
43 | 48 |
('templates/**.html', 'genshi', None), |
44 | 49 |
('public/**', 'ignore', None)]}, |
45 | 50 |
|
46 |
entry_points=""" |
|
47 |
[paste.app_factory] |
|
48 |
main = vigiboard.config.middleware:make_app |
|
49 |
|
|
50 |
[paste.app_install] |
|
51 |
main = pylons.util:PylonsInstaller |
|
52 |
""", |
|
51 |
entry_points={ |
|
52 |
'paste.app_factory': [ |
|
53 |
'main = vigiboard.config.middleware:make_app', |
|
54 |
], |
|
55 |
'paste.app_install': [ |
|
56 |
'main = pylons.util:PylonsInstaller', |
|
57 |
], |
|
58 |
'console_scripts': [ |
|
59 |
'runtests-vigiboard = vigiboard.tests:runtests [tests]', |
|
60 |
], |
|
61 |
}, |
|
53 | 62 |
) |
63 |
|
vigiboard/tests/__init__.py | ||
---|---|---|
9 | 9 |
from paste.script.appinstall import SetupCommand |
10 | 10 |
from routes import url_for |
11 | 11 |
from webtest import TestApp |
12 |
from nose.tools import eq_ |
|
12 |
import nose |
|
13 |
from nose.tools import eq_, nottest |
|
13 | 14 |
|
14 | 15 |
from vigiboard import model |
15 | 16 |
|
... | ... | |
62 | 63 |
"""Method called by nose after running each test""" |
63 | 64 |
# Cleaning up the database: |
64 | 65 |
teardown_db() |
66 |
|
|
67 |
|
|
68 |
def runtests(): |
|
69 |
# XXX hard-coded path. |
|
70 |
sys.argv[-1:] = ['--with-pylons', '../vigiboard/test.ini', 'vigiboard.tests' ] |
|
71 |
nose.main() |
|
72 |
|
Also available in: Unified diff