diff options
author | Hervé Beraud <hberaud@redhat.com> | 2020-02-26 10:30:41 +0100 |
---|---|---|
committer | Hervé Beraud <hberaud@redhat.com> | 2020-02-26 10:30:41 +0100 |
commit | 40d90a2d0680022d0080a88cd44ad8ffb047eade (patch) | |
tree | 02a849915d1d4b7e0791a0de3cc6c77e7d4432e3 | |
parent | ebf8368501500767fd4e6e13602bb88950a4484b (diff) | |
download | oslo-utils-40d90a2d0680022d0080a88cd44ad8ffb047eade.tar.gz |
Add test to check scientific notation on disk virtual size
Previously we only focused tests on disk size these changes
add more tests on other value which could be given and also
parsed by using similar regexes.
Also these changes format test name to match default format.
Change-Id: I49a67c4670e14f324a52b0454e78f9149813c6a0
-rw-r--r-- | oslo_utils/tests/test_imageutils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/oslo_utils/tests/test_imageutils.py b/oslo_utils/tests/test_imageutils.py index bfb0817..3a6bfec 100644 --- a/oslo_utils/tests/test_imageutils.py +++ b/oslo_utils/tests/test_imageutils.py @@ -52,6 +52,8 @@ class ImageUtilsRawTestCase(test_base.BaseTestCase): exp_virtual_size=2048)), ('2_KiB_with_byte_hint', dict(virtual_size='2 KiB (2048 bytes)', exp_virtual_size=2048)), + ('1e+03_MiB', dict(virtual_size='1e+03 MiB', + exp_virtual_size=1048576000)), ] _disk_size = [ @@ -69,7 +71,7 @@ class ImageUtilsRawTestCase(test_base.BaseTestCase): exp_disk_size=3328599655)), ('unavailable', dict(disk_size='unavailable', exp_disk_size=0)), - ('1e+03 MiB', dict(disk_size='1e+03 MiB', + ('1e+03_MiB', dict(disk_size='1e+03 MiB', exp_disk_size=1048576000)), ] |