From 1b0160f00845e641e95d39f163bdd650b6c71715 Mon Sep 17 00:00:00 2001 From: mdp0023 Date: Mon, 29 Apr 2024 10:30:24 -0500 Subject: [PATCH] update testing naming convention --- examples/svinsight_example_Travis_County.py | 24 ++++++++++----------- tests/test_svinsight.py | 12 +++++++++-- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/examples/svinsight_example_Travis_County.py b/examples/svinsight_example_Travis_County.py index cb33bad..0a34dac 100644 --- a/examples/svinsight_example_Travis_County.py +++ b/examples/svinsight_example_Travis_County.py @@ -4,20 +4,20 @@ # import package -from SVInsight import SVInsight as svi +from svinsight import SVInsight as svi import matplotlib.pyplot as plt -# # set variables -# project_name = 'Travis_County' -# file_path = "/Users/matthewpreisser/Documents/Research/Codes/SVInsight" -# api_key = os.environ.get('API_KEY') -# geoids = ['48453'] - -# # create instance -# test = svi(project_name = project_name, -# file_path = file_path, -# api_key = api_key, -# geoids=geoids) +# set variables +project_name = 'Travis_County' +file_path = "/Users/matthewpreisser/Documents/Research/Codes/SVInsight" +api_key = os.environ.get('API_KEY') +geoids = ['48453'] + +# create instance +test = svi(project_name = project_name, + file_path = file_path, + api_key = api_key, + geoids=geoids) # # set the boundary and year variables # boundary='bg' diff --git a/tests/test_svinsight.py b/tests/test_svinsight.py index 8a819e4..ce025ae 100644 --- a/tests/test_svinsight.py +++ b/tests/test_svinsight.py @@ -1,9 +1,17 @@ import sys -sys.path.insert(0, '/Users/matthewpreisser/Documents/Research/Codes/SVInsight') +s +# Get the directory that contains this file +this_directory = os.path.dirname(os.path.abspath(__file__)) + +# Get the root directory of your project (two levels up from this file) +root_directory = os.path.dirname(os.path.dirname(this_directory)) + +# Add the root directory to sys.path +sys.path.insert(0, root_directory) # import package -from SVInsight import SVInsight as svi +from svinsight import SVInsight as svi import os import pytest import geopandas as gpd