Пример #1
0
    def get_dir_size_test(self):
        """Test the getDirSize."""

        # dev null should have a size == 0
        self.assertEqual(util.getDirSize('/dev/null'), 0)

        # incorrect path should also return 0
        self.assertEqual(util.getDirSize('/dev/null/foo'), 0)

        # check if an int is always returned
        self.assertIsInstance(util.getDirSize('/dev/null'), int)
        self.assertIsInstance(util.getDirSize('/dev/null/foo'), int)
Пример #2
0
    def get_dir_size_test(self):
        """Test the getDirSize."""

        # dev null should have a size == 0
        self.assertEqual(util.getDirSize('/dev/null'), 0)

        # incorrect path should also return 0
        self.assertEqual(util.getDirSize('/dev/null/foo'), 0)

        # check if an int is always returned
        self.assertIsInstance(util.getDirSize('/dev/null'), int)
        self.assertIsInstance(util.getDirSize('/dev/null/foo'), int)
Пример #3
0
 def spaceRequired(self):
     return Size(util.getDirSize("/") * 1024)
Пример #4
0
 def space_required(self):
     return Size(util.getDirSize("/") * 1024)