]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/ceph-volume/ceph_volume/tests/util/test_disk.py
import quincy beta 17.1.0
[ceph.git] / ceph / src / ceph-volume / ceph_volume / tests / util / test_disk.py
index 5f4d57343e4c2516e2ff9d540bfa59285fa441d0..44f19e036fa47d87eb41dc6c35ccf72343e25444 100644 (file)
@@ -124,6 +124,9 @@ class TestHumanReadableSize(object):
         result = disk.human_readable_size(81.2*1024*1024*1024*1024)
         assert result == '81.20 TB'
 
+    def test_petabytes(self):
+        result = disk.human_readable_size(9.23*1024*1024*1024*1024*1024)
+        assert result == '9.23 PB'
 
 class TestSizeFromHumanReadable(object):
 
@@ -143,10 +146,14 @@ class TestSizeFromHumanReadable(object):
         result = disk.size_from_human_readable('2 G')
         assert result == disk.Size(gb=2)
 
-    def test_terrabytes(self):
+    def test_terabytes(self):
         result = disk.size_from_human_readable('2 T')
         assert result == disk.Size(tb=2)
 
+    def test_petabytes(self):
+        result = disk.size_from_human_readable('2 P')
+        assert result == disk.Size(pb=2)
+
     def test_case(self):
         result = disk.size_from_human_readable('2 t')
         assert result == disk.Size(tb=2)
@@ -182,10 +189,14 @@ class TestSizeParse(object):
         result = disk.Size.parse('2G')
         assert result == disk.Size(gb=2)
 
-    def test_terrabytes(self):
+    def test_terabytes(self):
         result = disk.Size.parse('2T')
         assert result == disk.Size(tb=2)
 
+    def test_petabytes(self):
+        result = disk.Size.parse('2P')
+        assert result == disk.Size(pb=2)
+
     def test_tb(self):
         result = disk.Size.parse('2Tb')
         assert result == disk.Size(tb=2)