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