Skip to content

Commit 21188e0

Browse files
committed
added test for #32, which passes?
1 parent 19de132 commit 21188e0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,14 @@ def test_save_baginfo(self):
493493
self.assertEqual(b.info["x"], ["a", "b", "c"])
494494
self.assertTrue(bag.is_valid())
495495

496+
def test_save_baginfo_with_sha1(self):
497+
bag = bagit.make_bag(self.tmpdir, checksum=["sha1"])
498+
self.assertTrue(bag.is_valid())
499+
bag.info['foo'] = "bar"
500+
bag.save()
501+
bag = bagit.Bag(self.tmpdir)
502+
self.assertTrue(bag.is_valid())
503+
496504
def test_save_only_baginfo(self):
497505
bag = bagit.make_bag(self.tmpdir)
498506
with open(j(self.tmpdir, 'data', 'newfile'), 'w') as nf:

0 commit comments

Comments
 (0)