Commit df7d02cd authored by André Anjos's avatar André Anjos 💬

Merge branch 'fixes' into 'master'


See merge request !34
parents 40c5b1eb 96e7a2a3
Pipeline #7778 passed with stages
in 17 minutes and 40 seconds
......@@ -31,23 +31,30 @@ def _run(package, run_call):
with as tar: tar.extractall(temp_dir)
package_dir = os.path.join(temp_dir, "bob.example.%s" % package)
def _join(*args):
a = (package_dir,) + args
return os.path.join(*a)
def _bin(path):
return _join('bin', path)
# buildout
# if we have a in our current directory, we develop both (as we might be in the current source directory of bob.extension and use it),
# otherwise we only develop the downloaded source package
develop = '%s\n.'%os.getcwd() if os.path.exists("") else '.'['buildout', 'buildout:prefer-final=false', 'buildout:develop=%s'%develop], cwd=package_dir)
assert os.path.exists(os.path.join(package_dir, "bin", "python"))
develop = '%s\n.' % os.getcwd() if os.path.exists('') else '.'['buildout', 'buildout:prefer-final=false', 'buildout:develop=%s'%develop], cwd=package_dir, shell=True)
assert os.path.exists(_bin('python'))
# nosetests['./bin/nosetests', '-sv'], cwd=package_dir)[_bin('nosetests'), '-sv'])
# check that the call is working, cwd=package_dir)[_bin(run_call[0])] + run_call[1:])['./bin/sphinx-build', 'doc', 'sphinx'], cwd=package_dir)
assert os.path.exists(os.path.join(package_dir, "sphinx", "index.html"))[_bin('sphinx-build'), _join('doc'), _join('sphinx')])
assert os.path.exists(_join('sphinx', 'index.html'))'./bin/python -c "import pkg_resources; from bob.example.%s import get_config; print(get_config())"'%package, cwd=package_dir, shell=True)[_bin('python'), '-c', 'import pkg_resources; from bob.example.%s import get_config; print(get_config())'%package])
......@@ -55,14 +62,14 @@ def _run(package, run_call):
def test_project():
# Tests that the bob.example.project works
_run('project', ['./bin/'])
_run('project', [''])
def test_extension():
# Tests that the bob.example.extension compiles and works
_run('extension', ['./bin/', '1', '2', '3', '4', '5'])
_run('extension', ['', '1', '2', '3', '4', '5'])
def test_library():
# Tests that the bob.example.library compiles and works
_run('library', ['./bin/', '1', '2', '3', '4', '5'])
_run('library', ['', '1', '2', '3', '4', '5'])
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment