Skip to content

Commit

Permalink
Update tests to reflect recent API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-sadeghi committed Oct 10, 2023
1 parent 931ee67 commit 8fb4277
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ def test_import_julia_modules():
Main = julia_helpers.init_julia()

# Ensure installed modules can be imported
julia_helpers.import_package(Main, "EquivalentCircuits")
ec = julia_helpers.import_package("EquivalentCircuits", Main=Main)
# Test Main is not required
ec = julia_helpers.import_package("EquivalentCircuits")

# Throw error for non-existent module
with pytest.raises(Exception):
julia_helpers.import_package(Main, "NonExistentModule")
julia_helpers.import_package("NonExistentModule", Main)
4 changes: 2 additions & 2 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def test_load_eis_data():
ae.load_eis_data("nonexistentfile.csv")

# Load a valid txt file of EIS data
fpath = ASSETS_DIR / 'testdata.txt'
df = ae.load_eis_data(fpath)
fpath = ASSETS_DIR / 'test_data.txt'
df = ae.io.load_eis_data(fpath)
frequencies = np.array(df["freq/Hz"]).astype(float)
reals = np.array(df["Re(Z)/Ohm"]).astype(float)
imags = -np.array(df["-Im(Z)/Ohm"]).astype(float)

0 comments on commit 8fb4277

Please sign in to comment.