<s> """<STR_LIT>""" <EOL> from . import TestCase <EOL> import bitmath <EOL> class TestParse ( TestCase ) : <EOL> def test_parse_b ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> bitmath . parse_string ( "<STR_LIT>" ) , <EOL> bitmath . Bit ( <NUM_LIT> ) ) <EOL> def test_parse_B ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> bitmath . parse_string ( "<STR_LIT>" ) , <EOL> bitmath . Byte ( <NUM_LIT> ) ) <EOL> def test_parse_Gb ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> bitmath . parse_string ( "<STR_LIT>" ) , <EOL> bitmath . Gb ( <NUM_LIT> ) ) <EOL> def test_parse_MiB ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> bitmath . parse_string ( "<STR_LIT>" ) , <EOL> bitmath . MiB ( <NUM_LIT> ) ) <EOL> def test_parse_Mio ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> bitmath . parse_string ( "<STR_LIT>" ) , <EOL> bitmath . MiB ( <NUM_LIT> ) ) <EOL> def test_parse_Eio ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> bitmath . parse_string ( "<STR_LIT>" ) , <EOL> bitmath . EiB ( <NUM_LIT> ) ) <EOL> def test_parse_Mo ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> bitmath . parse_string ( "<STR_LIT>" ) , <EOL> bitmath . MB ( <NUM_LIT> ) ) <EOL> def test_parse_Eo ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> bitmath . parse_string ( "<STR_LIT>" ) , <EOL> bitmath . EB ( <NUM_LIT> ) ) <EOL> def test_parse_bad_float ( self ) : <EOL> """<STR_LIT>""" <EOL> with self . assertRaises ( ValueError ) : <EOL> bitmath . parse_string ( "<STR_LIT>" ) <EOL> def test_parse_bad_unit ( self ) : <EOL> """<STR_LIT>""" <EOL> with self . assertRaises ( ValueError ) : <EOL> bitmath . parse_string ( "<STR_LIT>" ) <EOL> def test_parse_bad_unit2 ( self ) : <EOL> """<STR_LIT>""" <EOL> with self . assertRaises ( ValueError ) : <EOL> bitmath . parse_string ( "<STR_LIT>" ) <EOL> def test_parse_no_unit ( self ) : <EOL> """<STR_LIT>""" <EOL> with self . assertRaises ( ValueError ) : <EOL> bitmath . parse_string ( "<STR_LIT>" ) <EOL> def test_parse_string_non_string_input ( self ) : <EOL> """<STR_LIT>""" <EOL> with self . assertRaises ( ValueError ) : <EOL> bitmath . parse_string ( <NUM_LIT> ) <EOL> def test_parse_string_unicode ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertEqual ( <EOL> bitmath . parse_string ( u"<STR_LIT>" ) , <EOL> bitmath . GiB ( <NUM_LIT> ) ) </s>
