Skip to content

Commit

Permalink
Fix codql warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pietsjoh committed Aug 3, 2023
1 parent f3d1fa0 commit ff4588c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/supported_formats/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ big datasets is supported.
edax
emd
empad
hamamatsu
hspy
image
jeol
Expand Down
9 changes: 6 additions & 3 deletions rsciio/tests/test_hamamatsu.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ def test_axes_deflection(self):
np.testing.assert_allclose(ax1.axis[:5], expected_data_start_Y)

def test_original_metadata_no_comment(self):
original_metadata = deepcopy(self.s.original_metadata.as_dictionary())
del original_metadata["Comment"]
original_metadata_no_comment = {
k: v
for (k, v) in self.s.original_metadata.as_dictionary().items()
if k != "Comment"
}
expected_metadata = {
"character_im": "IM",
"offset_x": 0,
Expand All @@ -86,7 +89,7 @@ def test_original_metadata_no_comment(self):
"image_height_lines": 512,
"comment_length": 3311,
}
assert expected_metadata == original_metadata
assert expected_metadata == original_metadata_no_comment

def test_original_metadata_comment(self):
original_metadata = self.s.original_metadata.Comment.as_dictionary()
Expand Down

0 comments on commit ff4588c

Please sign in to comment.