Skip to content

Refactor test_transfor.py: pass variables to pytest parametrize, use conftest.py for common error messages #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 16, 2024
Prev Previous commit
Next Next commit
Remove the use of extra variable for params to prevent global scope i…
…n the file
  • Loading branch information
bobleesj committed Dec 15, 2024
commit 5e395388634b268b0d9f81b8d3dc7e4d2a7cd43f
8 changes: 8 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,11 @@ def wavelength_warning_msg():
"To specify a wavelength, if you have do = DiffractionObject(xarray, yarray, 'tth'), "
"you may set do.wavelength = 1.54 for a wavelength of 1.54 angstroms."
)


@pytest.fixture
def invalid_q_or_d_or_wavelength_error_msg():
return (
"The supplied input array and wavelength will result in an impossible two-theta. "
"Please check these values and re-instantiate the DiffractionObject with correct values."
)
Loading