-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
Environment
- Python version: 3.9.7
- netutils version: 1.0.0
Expected Behavior
>>> bits_to_name(1234)
'1Kbps'
>>> bits_to_name(1234, 1)
'1.2Kbps'
>>> bits_to_name(1234, 2)
'1.23Kbps'
>>> bits_to_name(1234, 3)
'1.234Kbps'
>>> bits_to_name(1234, 4)
'1.2340Kbps'Observed Behavior
>>> bits_to_name(1234) # expect 0 decimal places, instead get 1 decimal place but it's wrong!
'1.0Kbps'
>>> bits_to_name(1234, 1)
'1.2Kbps'
>>> bits_to_name(1234, 2)
'1.23Kbps'
>>> bits_to_name(1234, 3)
'1.234Kbps'
>>> bits_to_name(1234, 4) # expect 4 decimal places, instead still get 3 since the fourth is zero
'1.234Kbps'Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels