コード例 #1
0
 def test_get_capacity_5(self):
     """Test #5: Test that ("Unknown", "Unknown") is returned when capacity is not an integer."""
     self.assertEqual(cygwin.get_capacity(data=self.baddata3), ("Unknown", "Unknown"))
コード例 #2
0
 def test_get_capacity_3(self):
     """Test #3: Test that ("Unknown", "Unknown") is returned when capacity is not present."""
     self.assertEqual(cygwin.get_capacity(data=self.baddata1), ("Unknown", "Unknown"))
コード例 #3
0
 def test_get_capacity_4(self):
     """Test #4: Test that ("Unknown", "Unknown") is returned when capacity is insanely big (clearly wrong)."""
     self.assertEqual(cygwin.get_capacity(data=self.baddata2), ("Unknown", "Unknown"))
コード例 #4
0
 def test_get_capacity_2(self):
     """Test #2: Test that capacity is correct on a 10 EB disk"""
     raw_capacity, human_size = cygwin.get_capacity(data=self.data2)
     self.assertEqual(raw_capacity, "10000000000000000000")
     self.assertEqual(human_size, "10 EB")