Skip to content

Commit

Permalink
execute scaffolds using pip and py.test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmerickel committed May 10, 2016
1 parent 56cf0f4 commit aa52c5f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pyramid/scaffolds/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,18 @@ def install(self, tmpl_name): # pragma: no cover
self.make_venv(self.directory)
here = os.path.abspath(os.path.dirname(__file__))
os.chdir(os.path.dirname(os.path.dirname(here)))
subprocess.check_call(
[os.path.join(self.directory, 'bin', 'python'),
'setup.py', 'develop'])
pip = os.path.join(self.directory, 'bin', 'pip')
subprocess.check_call([pip, 'install', '-e', '.'])
os.chdir(self.directory)
subprocess.check_call(['bin/pcreate', '-s', tmpl_name, 'Dingle'])
os.chdir('Dingle')
py = os.path.join(self.directory, 'bin', 'python')
subprocess.check_call([py, 'setup.py', 'install'])
subprocess.check_call([pip, 'install', '.[testing]'])
if tmpl_name == 'alchemy':
populate = os.path.join(self.directory, 'bin',
'initialize_Dingle_db')
subprocess.check_call([populate, 'development.ini'])
subprocess.check_call([py, 'setup.py', 'test'])
subprocess.check_call([
os.path.join(self.directory, 'bin', 'py.test')])
pserve = os.path.join(self.directory, 'bin', 'pserve')
for ininame, hastoolbar in (('development.ini', True),
('production.ini', False)):
Expand Down
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ commands =
python pyramid/scaffolds/tests.py
deps = virtualenv

[testenv:py35-scaffolds]
basepython = python3.5
commands =
python pyramid/scaffolds/tests.py
deps = virtualenv

[testenv:pypy-scaffolds]
basepython = pypy
commands =
Expand Down

0 comments on commit aa52c5f

Please sign in to comment.