diff --git a/bootstrapvz/common/bytes.py b/bootstrapvz/common/bytes.py index d558aa6..f1e48ba 100644 --- a/bootstrapvz/common/bytes.py +++ b/bootstrapvz/common/bytes.py @@ -72,9 +72,6 @@ class Bytes(object): def __long__(self): return self.qty - def __abs__(self): - return self.qty - @onlybytes('Can only compare Bytes to Bytes') def __lt__(self, other): return self.qty < other.qty diff --git a/bootstrapvz/common/sectors.py b/bootstrapvz/common/sectors.py index ecdbc49..23679e7 100644 --- a/bootstrapvz/common/sectors.py +++ b/bootstrapvz/common/sectors.py @@ -43,9 +43,6 @@ class Sectors(object): def __long__(self): return self.get_sectors() - def __abs__(self): - return self.get_sectors() - @onlysectors('Can only compare sectors with sectors') def __lt__(self, other): return self.bytes < other.bytes diff --git a/tests/unit/bytes.py b/tests/unit/bytes.py index 19e8b08..7c95797 100644 --- a/tests/unit/bytes.py +++ b/tests/unit/bytes.py @@ -104,5 +104,5 @@ def test_imod_int(): b %= 5 -def test_abs(): - eq_(pow(1024, 3), abs(Bytes('1GiB'))) +def test_convert_int(): + eq_(pow(1024, 3), int(Bytes('1GiB'))) diff --git a/tests/unit/sectors.py b/tests/unit/sectors.py index b15bac7..7a86ae9 100644 --- a/tests/unit/sectors.py +++ b/tests/unit/sectors.py @@ -123,6 +123,6 @@ def test_imod_int(): s %= 5 -def test_abs(): +def test_convert_int(): secsize = 512 - eq_(pow(1024, 3) / secsize, abs(Sectors('1GiB', secsize))) + eq_(pow(1024, 3) / secsize, int(Sectors('1GiB', secsize)))