コード例 #1
0
ファイル: sizes_test.py プロジェクト: jwg4/justbytes
 def testRoundingToBytes(self, n):
     """
     Test that it does the proper thing rounding down to bytes.
     """
     SizeConfig.set_input_config(InputConfig(B, ROUND_DOWN))
     res = getSizeFromInput(n)
     self.assertLessEqual(res.magnitude, Fraction(n))
     self.assertEqual(Fraction(res.magnitude).denominator, 1)
コード例 #2
0
ファイル: sizes_test.py プロジェクト: jwg4/justbytes
 def tearDown(self):
     SizeConfig.set_input_config(self._input_config)