kopia lustrzana https://github.com/jupyterhub/repo2docker
Fix the Pipfile + setup.py tests
Apparently testing to import the package will work no matter what as we will find it locally so setup.py may not need to run. By adding a small dependency I could check if the dependency is installed and now the tests actually tests what they should.pull/649/head
rodzic
d9e58c2634
commit
a59e169e2f
|
@ -8,5 +8,5 @@ setup(
|
||||||
author_email='dummy@my-email.com',
|
author_email='dummy@my-email.com',
|
||||||
description='Dummy package for testing purposes only',
|
description='Dummy package for testing purposes only',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
install_requires=['numpy'],
|
install_requires=['pypi-pkg-test==0.0.4'],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import there
|
import there
|
||||||
import dummy
|
import dummy
|
||||||
|
|
||||||
|
# This package should be available, as it was a dependency for dummy
|
||||||
|
import pypi_pkg_test
|
||||||
|
|
|
@ -8,5 +8,5 @@ setup(
|
||||||
author_email='dummy@my-email.com',
|
author_email='dummy@my-email.com',
|
||||||
description='Dummy package for testing purposes only',
|
description='Dummy package for testing purposes only',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
install_requires=['numpy'],
|
install_requires=['pypi-pkg-test==0.0.4'],
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,7 +3,9 @@ import there
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import dummy
|
import dummy
|
||||||
|
import pypi_pkg_test
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
# We want an ImportError to be thrown for this test to pass
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
raise Exception("'dummy' shouldn't have been installed from setup.py when a Pipfile was present")
|
raise Exception("'dummy' and its dependency 'pypi_pkg_test' shouldn't have been installed! A Pipfile was present without explicit instructions to install the local package 'dummy'.")
|
||||||
|
|
Ładowanie…
Reference in New Issue