From d67ace4cab6bcb350903e2dfdfcb8a1e77ea43a2 Mon Sep 17 00:00:00 2001 From: amoodie Date: Mon, 30 Mar 2020 19:03:49 -0500 Subject: [PATCH] import tests relative --- .gitignore | 4 ++++ .travis.yml | 4 +--- tests/test_bmi_delta.py | 4 +++- tests/test_deltaRCM_driver.py | 6 ++++-- tests/test_deltaRCM_tools.py | 4 +++- tests/test_init_tools.py | 4 +++- tests/test_sed_tools.py | 4 +++- tests/test_shared_tools.py | 4 +++- tests/test_water_tools.py | 4 +++- 9 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 1dbc687d..2994cbf9 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ nosetests.xml coverage.xml *,cover .hypothesis/ +.pytest_cache # Translations *.mo @@ -60,3 +61,6 @@ target/ #Ipython Notebook .ipynb_checkpoints + +# SublimeText docs +*.sublime-* diff --git a/.travis.yml b/.travis.yml index e7985157..513f3f8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,9 +16,7 @@ jobs: python: "3.8" install: - pip install -r requirements.txt - - pip install pytest - - pip install pytest-cov - - pip install coveralls + - pip install pytest pytest-cov coveralls script: pytest --cov=pyDeltaRCM_WMT/ after_success: - coveralls diff --git a/tests/test_bmi_delta.py b/tests/test_bmi_delta.py index 84bd656a..a0a9cb45 100644 --- a/tests/test_bmi_delta.py +++ b/tests/test_bmi_delta.py @@ -2,8 +2,10 @@ import pytest -import os +import sys, os import numpy as np +sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/..")) + from pyDeltaRCM import BmiDelta # need to create a simple case of pydeltarcm object to test these functions diff --git a/tests/test_deltaRCM_driver.py b/tests/test_deltaRCM_driver.py index 9752f338..1037293f 100644 --- a/tests/test_deltaRCM_driver.py +++ b/tests/test_deltaRCM_driver.py @@ -2,9 +2,11 @@ import pytest -import os +import sys, os import numpy as np -import pyDeltaRCM +sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/..")) + +# import pyDeltaRCM from pyDeltaRCM import BmiDelta # need to create a simple case of pydeltarcm object to test these functions diff --git a/tests/test_deltaRCM_tools.py b/tests/test_deltaRCM_tools.py index d530fdc8..46884eaf 100644 --- a/tests/test_deltaRCM_tools.py +++ b/tests/test_deltaRCM_tools.py @@ -2,8 +2,10 @@ import pytest -import os +import sys, os import numpy as np +sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/..")) + from pyDeltaRCM import BmiDelta from pyDeltaRCM import Tools diff --git a/tests/test_init_tools.py b/tests/test_init_tools.py index 77929c7d..74c7428c 100644 --- a/tests/test_init_tools.py +++ b/tests/test_init_tools.py @@ -2,8 +2,10 @@ import pytest -import os +import sys, os import numpy as np +sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/..")) + from pyDeltaRCM import BmiDelta from pyDeltaRCM import init_tools diff --git a/tests/test_sed_tools.py b/tests/test_sed_tools.py index 0fc5db20..d6327c56 100644 --- a/tests/test_sed_tools.py +++ b/tests/test_sed_tools.py @@ -2,8 +2,10 @@ import pytest -import os +import sys, os import numpy as np +sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/..")) + from pyDeltaRCM import BmiDelta from pyDeltaRCM import sed_tools diff --git a/tests/test_shared_tools.py b/tests/test_shared_tools.py index 97ad885f..2c18d98b 100644 --- a/tests/test_shared_tools.py +++ b/tests/test_shared_tools.py @@ -2,8 +2,10 @@ import pytest -import os +import sys, os import numpy as np +sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/..")) + from pyDeltaRCM import BmiDelta from pyDeltaRCM import shared_tools diff --git a/tests/test_water_tools.py b/tests/test_water_tools.py index 4df91922..de25af47 100644 --- a/tests/test_water_tools.py +++ b/tests/test_water_tools.py @@ -2,8 +2,10 @@ import pytest -import os +import sys, os import numpy as np +sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/..")) + from pyDeltaRCM import BmiDelta from pyDeltaRCM import water_tools