[rhinstaller/blivet/pulls/72 master] Pickling support for Size

vpodzime installerbot-noreply at redhat.com
Thu Apr 9 13:13:12 UTC 2015


> @@ -194,6 +196,10 @@ def testScientificNotation(self):
>          self.assertEqual(size.parseSpec("1E-4KB"), Decimal("0.1"))
>          self.assertEqual(Size("1E-10KB"), Size(0))
>  
> +    def testPickling(self):
> +        s = Size("10 MiB")
> +        self.assertEqual(s, cPickle.loads(cPickle.dumps(s)))

But we care about pickling working not our implementation of some method working as it is written. Maybe not so unit-testy, but what @vojtechtrefny has in the test is what we actually want to test.

-- 
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/72#discussion_r28059680


More information about the anaconda-patches mailing list