Skip to content

Commit

Permalink
start trying to address various test warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
glass-ships committed Feb 27, 2025
1 parent df0cde3 commit 1f3ef9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ markers = [
"mount_eqsans: mark a test as using /SNS/EQSANS/shared/sans-backend/data/ data mount",
]
addopts = "--verbose -n 8"
# filterwarnings = ["error", "ignore::UserWarning"]

# [aliases]
# test = "pytest"
2 changes: 1 addition & 1 deletion src/drtsans/tof/eqsans/momentum_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def moderator_time_uncertainty(wl):

# convert from zero-dimensional nparray to float
if original_float:
time_error = float(time_error)
time_error = float(time_error[0])

return time_error

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/drtsans/test_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ def test_get_curvature_radius(temp_workspace_name):
def test_pixel_masks(temp_workspace_name):
workspace = empty_instrument_workspace(temp_workspace_name(), filename="BIOSANS_Definition.xml")
apply_mask(workspace, Components="wing_detector")
assert np.alltrue(geo.get_pixel_masks(workspace, "wing_detector"))
assert np.all(geo.get_pixel_masks(workspace, "wing_detector"))
apply_mask(workspace, mask=list(range(10)))
mask_in_detector1 = geo.get_pixel_masks(workspace, "wing_detector")[:10]
assert np.alltrue(mask_in_detector1)
assert np.all(mask_in_detector1)


def test_get_pixel_distances(temp_workspace_name, fetch_idf):
Expand Down

0 comments on commit 1f3ef9a

Please sign in to comment.