Skip to content

Commit b9b05a5

Browse files
committed
Shorten comments for test_diffraction_objects
1 parent d65aa57 commit b9b05a5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Diff for: tests/test_diffraction_objects.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ def test_dump(tmp_path, mocker):
241241
test.name = "test"
242242
test.scat_quantity = "x-ray"
243243

244-
# Setup the testing environment to capture warnings triggered by an invalid arcsin input
245244
with warnings.catch_warnings(record=True) as captured_warnings:
246245
# Configure the warnings system to capture all warnings
247246
warnings.simplefilter("always")
@@ -251,15 +250,14 @@ def test_dump(tmp_path, mocker):
251250
x, y, "q", metadata={"thing1": 1, "thing2": "thing2", "package_info": {"package2": "3.4.5"}}
252251
)
253252

254-
# Verify that at least one RuntimeWarning is raised due to the arcsin domain error from wavelength 1.54
253+
# Verify that at least one RuntimeWarning is raised due to the arcsin error from wavelength 1.54
255254
assert any(
256255
isinstance(w.message, RuntimeWarning) for w in captured_warnings
257256
), "Expected a RuntimeWarning due to invalid arcsin input value from the wavelength set to 1.54"
258257

259-
# Ensure that exactly one warning was captured to confirm that no additional unexpected warnings are raised
258+
# Ensure that exactly one warning was captured
260259
assert len(captured_warnings) == 1, "Expected exactly one warning to be captured"
261260

262-
# Patch the version lookup to control the external dependency in the test environment
263261
mocker.patch("importlib.metadata.version", return_value="3.3.0")
264262

265263
with freeze_time("2012-01-14"):

0 commit comments

Comments
 (0)