fork/mons
git clone https://git.julia.blue/fork/mons
e96b46b
main
1import pytest 2 3from mons .formatting import format_bytes 4from mons .formatting import format_columns 5 6 7@ pytest . mark . parametrize ( "input, expected" , [( 1299999 , "1.2 MiB" )]) 8def test_format_bytes (input ,expected ): 9assert format_bytes (input )== expected 10 11 12@ pytest . mark . parametrize ( 13"input, expected" , 14[ 15( 16{ "foo" : "value" , "bar" : "value" }, 17""" 18foo\tvalue 19bar\tvalue 20""" . strip (), 21), 22( 23{ "foo" : "value" , "foobarbaz" : "value" }, 24""" 25foo \tvalue 26foobarbaz\tvalue 27""" . strip (), 28), 29({}, "" ), 30], 31) 32def test_format_columns (input ,expected ): 33assert format_columns (input )== expected