Skip to content

Commit

Permalink
added tests for the new regex (#86)
Browse files Browse the repository at this point in the history
Added the needed test for alchemlyb PR # 273,
namely:
a field=value without spaces around the equal sign, and a file where the initial simulation time can't be read.
  • Loading branch information
DrDomenicoMarson committed Nov 14, 2022
1 parent efe8202 commit e9d5401
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/alchemtest/amber/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def load_testfiles():
"no_control_data": [testfiles_path / "no_control_data.out.bz2"],
"no_atomic_section": [testfiles_path / "no_atomic_section.out.bz2"],
"high_and_wrong_number_of_mbar_windows": [testfiles_path / "high_and_wrong_number_of_mbar_windows.out.bz2"],
"no_spaces_around_equal": [testfiles_path / "no_spaces_around_equal.out.bz2"],
"no_starting_simulation_time": [testfiles_path / "no_starting_simulation_time.out.bz2"],
}

with open(testfiles_path / 'descr.rst') as rst_file:
Expand Down
4 changes: 3 additions & 1 deletion src/alchemtest/amber/testfiles/descr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Notes
- no_useful_data.out.bz2: AMBER output file without useful data, truncated after the header
- none_in_mbar.out.bz2: AMBER output file with a wrongly formatted MBAR section. Specifically, a lambda value in a MBAR section has been altered, so it dowsn't match with the other MBAR sections and the expected lambda values (0.2500 --> 0.2550)
- not_finished_run.out.bz2: AMBER output file from an unterminated run
- high_number_of_mbar_windows.out.bz2: AMBER output file from a run with high number of MBAR lambdas
- high_number_of_mbar_windows.out.bz2: AMBER output file from a run with high number of MBAR lambdas
- no_spaces_around_equal.out.bz2: AMBER output file where there are no spaces around the '=' # the ' begin time read from' section
- no_starting_simulation_time.out.bz2: AMBER output file where the starting simulation time is not read

.. versionadded:: 0.7.0
Binary file not shown.
Binary file not shown.

0 comments on commit e9d5401

Please # to comment.