added failure error code to tests

This commit is contained in:
Stuart Mitchell
2015-03-15 06:42:23 +00:00
parent 9226e8dd3f
commit fe2c706e9b
2 changed files with 66 additions and 0 deletions

62
.gitignore vendored Normal file
View File

@@ -0,0 +1,62 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
# Translations
*.mo
*.pot
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# virtualenv
py-ve*
#cloud9
.c9

View File

@@ -2254,6 +2254,7 @@ def pulpTestAll():
YAPOSIB YAPOSIB
] ]
failed = False
for s in solvers: for s in solvers:
if s().available(): if s().available():
try: try:
@@ -2262,8 +2263,11 @@ def pulpTestAll():
except Exception as e: except Exception as e:
print(e) print(e)
print("* Solver", s, "failed.") print("* Solver", s, "failed.")
failed = True
else: else:
print("Solver %s unavailable" % s) print("Solver %s unavailable" % s)
if failed:
raise PulpError("Tests Failed")
def pulpDoctest(): def pulpDoctest():
""" """