Пример #1
0
 def test_base(self, size, out):
     """Test with an alternative base."""
     assert utils.format_size(size, base=1000) == out
Пример #2
0
 def test_suffix(self, size, out):
     """Test the suffix option."""
     assert utils.format_size(size, suffix='B') == out + 'B'
Пример #3
0
 def test_format_size(self, size, out):
     """Test format_size with several tests."""
     assert utils.format_size(size) == out
Пример #4
0
 def test_base(self, size, out):
     """Test with an alternative base."""
     assert utils.format_size(size, base=1000) == out
Пример #5
0
 def test_suffix(self, size, out):
     """Test the suffix option."""
     assert utils.format_size(size, suffix='B') == out + 'B'
Пример #6
0
 def test_format_size(self, size, out):
     """Test format_size with several tests."""
     assert utils.format_size(size) == out