Skip to content

Improve test comments under @pytest.mark.parametrize in test_diffraction_objects.py #273

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 25, 2024
Merged
Show file tree
Hide file tree
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
Add news and scale to need to be more refined
  • Loading branch information
bobleesj committed Dec 23, 2024
commit 406175d6313d2750dfd93ea100a703cdc7786bb1
23 changes: 23 additions & 0 deletions news/pytest-comment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* Group's Pytest practices for using @pytest.mark.parametrize in test_diffraction_objects.py

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
3 changes: 1 addition & 2 deletions tests/test_diffraction_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ def test_diffraction_objects_equality(
"xtype, expected_xarray",
[
# Test whether on_xtype returns the correct xarray values.
# The test DO instance is initialized with tth.
# C1: tth to tth, expect no change in xaray value
# 1. "tth" provided, expect tth
# 2. "2theta" provided, expect tth
Expand Down Expand Up @@ -199,7 +198,7 @@ def test_init_invalid_xtype():
"org_do_args, target_do_args, scale_inputs, expected",
[
# Test whether scale_to() scales to the expected values
# C1: Same x-array and y-array, check offset
# C1: Same x-array and y-array with 2.1 offset, expect yarray shifted by 2.1 offset
(
{
"xarray": np.array([10, 15, 25, 30, 60, 140]),
Expand Down
Loading