diff --git a/dsi/backends/tests/test_sqlite.py b/dsi/backends/tests/test_sqlite.py index dceea03b..896df6bb 100644 --- a/dsi/backends/tests/test_sqlite.py +++ b/dsi/backends/tests/test_sqlite.py @@ -23,7 +23,7 @@ def test_wildfire_data_sql_artifact(): assert True def test_wildfire_data_csv_artifact(): - csvpath = '/'.join([get_git_root('.'), '../examples/data/wildfiredata.csv']) + csvpath = '/'.join([get_git_root('.'), '/home/runner/work/dsi/examples/data/wildfiredata.csv']) dbpath = "wildfire.db" store = Sqlite(dbpath) store.put_artifacts_csv(csvpath, "simulation", isVerbose=isVerbose) @@ -60,7 +60,7 @@ def test_jsondata_artifact_put(): assert True def test_yosemite_data_csv_artifact(): - csvpath = '/'.join([get_git_root('.'), '../examples/data/yosemite5.csv']) + csvpath = '/'.join([get_git_root('.'), '/home/runner/work/dsi/examples/data/yosemite5.csv']) dbpath = "yosemite.db" store = Sqlite(dbpath) store.put_artifacts_csv(csvpath, "vision", isVerbose=isVerbose) @@ -87,8 +87,8 @@ def test_artifact_query(): def test_yaml_reader(): reader = Sqlite("yaml-test.db") - reader.yamlToSqlite("../examples/data/schema.yml", "yaml-test", deleteSql=False) - subprocess.run(["diff", "../examples/data/compare-schema.sql", "yaml-test.sql"], stdout=open("compare_sql.txt", "w")) + reader.yamlToSqlite("/home/runner/work/dsi/examples/data/schema.yml", "yaml-test", deleteSql=False) + subprocess.run(["diff", "/home/runner/work/dsi/examples/data/compare-schema.sql", "yaml-test.sql"], stdout=open("compare_sql.txt", "w")) file_size = os.path.getsize("compare_sql.txt") os.remove("compare_sql.txt") os.remove("yaml-test.sql") @@ -98,8 +98,8 @@ def test_yaml_reader(): def test_toml_reader(): reader = Sqlite("toml-test.db") - reader.tomlToSqlite("../examples/data/schema.toml", "toml-test", deleteSql=False) - subprocess.run(["diff", "../examples/data/compare-schema.sql", "toml-test.sql"], stdout=open("compare_sql.txt", "w")) + reader.tomlToSqlite("/home/runner/work/dsi/examples/data/schema.toml", "toml-test", deleteSql=False) + subprocess.run(["diff", "/home/runner/work/dsi/examples/data/compare-schema.sql", "toml-test.sql"], stdout=open("compare_sql.txt", "w")) file_size = os.path.getsize("compare_sql.txt") os.remove("compare_sql.txt") os.remove("toml-test.sql") diff --git a/dsi/plugins/tests/test_file_writer.py b/dsi/plugins/tests/test_file_writer.py index efb5979c..f5a7f1d6 100644 --- a/dsi/plugins/tests/test_file_writer.py +++ b/dsi/plugins/tests/test_file_writer.py @@ -12,6 +12,6 @@ def get_git_root(path): def test_csv_plugin_type(): path = '/'.join([get_git_root('.'), 'examples/data', 'wildfiredata.sqlite_db']) - back = Sqlite(filenames=path) + back = Sqlite(filename=path) #assert type(plug.output_collector) == OrderedDict \ No newline at end of file diff --git a/dsi/tests/test_plugin.py b/dsi/tests/test_plugin.py index ca3a6074..44879322 100644 --- a/dsi/tests/test_plugin.py +++ b/dsi/tests/test_plugin.py @@ -15,6 +15,8 @@ def test_export_db_erd(): connection.commit() connection.close() + fw.ER_Diagram("test.db").export_erd("test.db", "test1") + er_image = cv2.imread("test1.png") assert er_image is not None #check if image generated at all