Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add testing framework, .gitignore (#1)
* add testing framework, .gitignore * fix cvxopt
- Loading branch information
1 parent
2d480ee
commit d1b66f9
Showing
3 changed files
with
141 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# iPython checkpoint folders | ||
.ipynb_checkpoints/ | ||
|
||
# Pickled solutions | ||
*.p | ||
|
||
# MOSEK CLI folder | ||
gpkit_tmp/ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
bin/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
# Rope | ||
.ropeproject | ||
|
||
# Django stuff: | ||
*.log | ||
*.pot | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# MATLAB autosave | ||
*.asv | ||
|
||
# CI test xmloutput | ||
test_reports/ | ||
test_reports_nounits/ | ||
|
||
# MacOSX | ||
*.DS_Store | ||
|
||
# vim | ||
*.swp | ||
|
||
# OSX | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import unittest | ||
import matplotlib as mpl | ||
mpl.use('Agg') # has to be called before matplotlib.pyplot is imported | ||
|
||
from gpkit import settings | ||
import gpkit.tests | ||
from FeasibilityDemo import plot_feasibility_simple_Wing, C_Lmax, V_min | ||
|
||
|
||
class TestFeasibilityDemo(unittest.TestCase): | ||
"""test for the feasibility plots demo""" | ||
|
||
def test_elliptical(self): | ||
if settings["default_solver"] == "cvxopt": | ||
return | ||
plot_feasibility_simple_Wing('elliptical', C_Lmax, V_min, | ||
'r', 1.25, 'r', 1.2) | ||
|
||
def test_box(self): | ||
if settings["default_solver"] == "cvxopt": | ||
return | ||
plot_feasibility_simple_Wing('box', C_Lmax, V_min, | ||
'pr', 25, 'pr', 20) | ||
|
||
|
||
TESTS = [TestFeasibilityDemo] | ||
|
||
|
||
def run(xmloutput=False, verbosity=1): | ||
"run design space visualization tests" | ||
gpkit.tests.run(tests=TESTS, xmloutput=xmloutput, verbosity=verbosity) | ||
|
||
|
||
if __name__ == "__main__": | ||
run() |