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
Erik Sundell 2019-04-21 17:30:36 +02:00
rodzic d9e58c2634
commit a59e169e2f
4 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -8,5 +8,5 @@ setup(
author_email='dummy@my-email.com',
description='Dummy package for testing purposes only',
packages=find_packages(),
install_requires=['numpy'],
install_requires=['pypi-pkg-test==0.0.4'],
)

Wyświetl plik

@ -1,3 +1,6 @@
#!/usr/bin/env python
import there
import dummy
# This package should be available, as it was a dependency for dummy
import pypi_pkg_test

Wyświetl plik

@ -8,5 +8,5 @@ setup(
author_email='dummy@my-email.com',
description='Dummy package for testing purposes only',
packages=find_packages(),
install_requires=['numpy'],
install_requires=['pypi-pkg-test==0.0.4'],
)

Wyświetl plik

@ -3,7 +3,9 @@ import there
try:
import dummy
import pypi_pkg_test
except ImportError:
# We want an ImportError to be thrown for this test to pass
pass
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'.")