Skip to content

tests for scale_to #211

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 9 commits into from
Dec 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove expected parameters in bad tests
  • Loading branch information
yucongalicechen committed Dec 12, 2024
commit 79161f177ec2463be321fd6a47fe28ca63f27328
31 changes: 14 additions & 17 deletions tests/test_diffraction_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,27 +290,24 @@ def test_scale_to(inputs, expected):

params_scale_to_bad = [
(
[
np.array([10, 25, 30.1, 40.2, 61, 120, 140]),
np.array([10, 20, 30, 40, 50, 60, 100]),
"tth",
2 * np.pi,
np.array([20, 25.5, 32, 45, 50, 62, 100, 125, 140]),
np.array([1.1, 2, 3, 3.5, 4, 5, 10, 12, 13]),
"tth",
2 * np.pi,
None,
60,
10,
0,
],
["tth", np.array([1, 2, 3, 4, 5, 6, 10])],
np.array([10, 25, 30.1, 40.2, 61, 120, 140]),
np.array([10, 20, 30, 40, 50, 60, 100]),
"tth",
2 * np.pi,
np.array([20, 25.5, 32, 45, 50, 62, 100, 125, 140]),
np.array([1.1, 2, 3, 3.5, 4, 5, 10, 12, 13]),
"tth",
2 * np.pi,
None,
60,
10,
0,
),
]


@pytest.mark.parametrize("inputs, expected", params_scale_to_bad)
def test_scale_to_bad(inputs, expected):
@pytest.mark.parametrize("inputs", params_scale_to_bad)
def test_scale_to_bad(inputs):
orig_diff_object = DiffractionObject(xarray=inputs[0], yarray=inputs[1], xtype=inputs[2], wavelength=inputs[3])
target_diff_object = DiffractionObject(
xarray=inputs[4], yarray=inputs[5], xtype=inputs[6], wavelength=inputs[7]
Expand Down
Loading