Skip to content

Commit

Permalink
fix(tests/test_TotalSize): fit OS
Browse files Browse the repository at this point in the history
  • Loading branch information
breakthewall committed Dec 7, 2023
1 parent f8dbe01 commit f5cacdd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_TotalSize.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

from unittest import TestCase
from platform import system

from brs_utils import total_size

Expand All @@ -22,4 +23,11 @@ def test_totalsize_float(self):
def test_totalsize_str(self):
msg = 'this is a test'
size = total_size(str(msg))
self.assertEqual(size, 49+len(msg))
# different size on Linux and MacOS
# check the OS
if system() == 'Linux':
self.assertEqual(size, 41+len(msg))
elif system() == 'Darwin':
self.assertEqual(size, 49+len(msg))
else:
self.fail('OS not supported')

0 comments on commit f5cacdd

Please sign in to comment.