[master 16/17] Fix some small mistakes in tests using availability information.
mulkieran
installerbot-noreply at redhat.com
Thu Apr 23 16:39:53 UTC 2015
From: mulhern <amulhern at redhat.com>
Related: #12
These showed up because fewer tests are skipped with the finer granularity.
Signed-off-by: mulhern <amulhern at redhat.com>
---
tests/formats_test/fstesting.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/formats_test/fstesting.py b/tests/formats_test/fstesting.py
index eb527f5..33fb488 100644
--- a/tests/formats_test/fstesting.py
+++ b/tests/formats_test/fstesting.py
@@ -50,7 +50,7 @@ def _test_sizes(self, an_fs):
else:
expected_size = _size
# If the size can be obtained it will not be 0
- if an_fs._info.implemented:
+ if not an_fs._sizeinfo.availabilityErrors:
self.assertNotEqual(expected_size, Size(0))
self.assertTrue(expected_size <= self._DEVICE_SIZE)
# Otherwise it will be 0, assuming the device was not initialized
@@ -60,7 +60,7 @@ def _test_sizes(self, an_fs):
self.assertEqual(an_fs.size, expected_size)
# Only the resizable filesystems can figure out their current min size
- if an_fs._resize:
+ if not an_fs._sizeinfo.availabilityErrors:
expected_min_size = min_size
else:
expected_min_size = an_fs._minSize
@@ -74,7 +74,7 @@ def _test_sizes(self, an_fs):
self.assertEqual(an_fs.currentSize, _size)
# Free is the actual size - the minimum size
- self.assertEqual(an_fs.free, _size - expected_min_size)
+ self.assertEqual(an_fs.free, max(Size(0), _size - expected_min_size))
# target size is set by side-effect
self.assertEqual(an_fs.targetSize, an_fs._targetSize)
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/6e9d0d5a8d358c2eb949c7dedec66ba03c938830
More information about the anaconda-patches
mailing list