Skip to content

Commit

Permalink
looks like np2 impacted mrcfile as well
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettwrong committed Oct 21, 2024
1 parent 21c0813 commit d462e94
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_mrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@ def testUpdate(self):
with mrcfile.new_mmap(
files[1], shape=(self.n, self.n), mrc_mode=2, overwrite=True
) as mrc:
mrc.set_data(self.a.astype(np.float32))
mrc.set_data(self.a)
self.stats.update_header(mrc)
mrc.header.time = epoch
mrc.header.label[0] = label

# Our homebrew and mrcfile files should now match to the bit.
comparison = sha256sum(files[0]) == sha256sum(files[1])
# Expected hash:
# 71355fa0bcd5b989ff88166962ea5d2b78ea032933bd6fda41fbdcc1c6d1a009
logging.debug(f"sha256(file0): {sha256sum(files[0])}")
logging.debug(f"sha256(file1): {sha256sum(files[1])}")

self.assertTrue(comparison)

0 comments on commit d462e94

Please sign in to comment.