Skip to content

Commit

Permalink
add text compare
Browse files Browse the repository at this point in the history
  • Loading branch information
lldelisle committed May 8, 2024
1 parent 9406740 commit 7b29cab
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions baredSC/tests/test_baredSC_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ def test_baredSC_1d_2gauss_log_pdf():
# assert res is None, res

# os.remove(obtained_file)
# for suffix in BARED_1D_TEXT_SUFFIX:
# expected_file = f'{expected}{suffix}'
# obtained_file = f'{outfig_base}{suffix}'
# if suffix == "_p.txt":
# use_cols = (1, 2, 3)
# else:
# use_cols = None
# expected_mat = np.loadtxt(expected_file, skiprows=1, usecols=use_cols)
# obtained_mat = np.loadtxt(obtained_file, skiprows=1, usecols=use_cols)
# assert np.all(np.isclose(obtained_mat, expected_mat))
for suffix in BARED_1D_TEXT_SUFFIX:
expected_file = f'{expected}{suffix}'
obtained_file = f'{outfig_base}{suffix}'
if suffix == "_p.txt":
use_cols = (1, 2, 3)
else:
use_cols = None
expected_mat = np.loadtxt(expected_file, skiprows=1, usecols=use_cols)
obtained_mat = np.loadtxt(obtained_file, skiprows=1, usecols=use_cols)
assert np.all(np.isclose(obtained_mat, expected_mat))

# os.remove(obtained_file)
os.remove(obtained_file)

0 comments on commit 7b29cab

Please sign in to comment.