コード例 #1
0
def test_encode_preserves_iterable_type():
    value_set = {'a', 'b', 'c'}
    value_tuple = ('a', 'b', 'c')
    assert type(value_set) == type(encode_to_utf8(value_set))
    assert type(value_tuple) == type(encode_to_utf8(value_tuple))
コード例 #2
0
ファイル: test_utf8_helpers.py プロジェクト: qguv/config
 def test_encodes_utf8_dict_to_unicode():
     assert {b_ae: b_aa, b_oe: b_aa} == encode_to_utf8({'æ': 'å', 'ø': 'å'})
コード例 #3
0
ファイル: test_utf8_helpers.py プロジェクト: zware/wee-slack
 def test_encodes_utf8_dict_to_unicode():
     assert {b_ae: b_aa, b_oe: b_aa} == encode_to_utf8({'æ': 'å', 'ø': 'å'})
コード例 #4
0
ファイル: test_utf8_helpers.py プロジェクト: qguv/config
 def test_encode_preserves_byte_strings():
     assert b_word == encode_to_utf8(b_word)
コード例 #5
0
ファイル: test_utf8_helpers.py プロジェクト: qguv/config
 def test_encode_preserves_iterable_type():
     value_set = {'a', 'b', 'c'}
     value_tuple = ('a', 'b', 'c')
     assert type(value_set) == type(encode_to_utf8(value_set))
     assert type(value_tuple) == type(encode_to_utf8(value_tuple))
コード例 #6
0
def test_encodes_utf8_list_to_unicode():
    assert [b'æ', b'ø', b'å'] == encode_to_utf8([u'æ', u'ø', u'å'])
コード例 #7
0
ファイル: test_utf8_helpers.py プロジェクト: qguv/config
 def test_encode_should_not_transform_bytes():
     assert b_word == encode_to_utf8(b_word)
コード例 #8
0
 def test_encode_preserves_mapping_type():
     value_dict = {"a": "x", "b": "y", "c": "z"}
     value_ord_dict = OrderedDict(value_dict)
     assert type(value_dict) == type(encode_to_utf8(value_dict))
     assert type(value_ord_dict) == type(encode_to_utf8(value_ord_dict))
コード例 #9
0
 def test_encode_preserves_iterable_type():
     value_set = {"a", "b", "c"}
     value_tuple = ("a", "b", "c")
     assert type(value_set) == type(encode_to_utf8(value_set))
     assert type(value_tuple) == type(encode_to_utf8(value_tuple))
コード例 #10
0
 def test_encode_preserves_string_without_utf8():
     assert b"test" == encode_to_utf8("test")
コード例 #11
0
 def test_encode_preserves_byte_strings():
     assert b_word == encode_to_utf8(b_word)
コード例 #12
0
 def test_encode_should_not_transform_bytes():
     assert b_word == encode_to_utf8(b_word)
コード例 #13
0
 def test_encode_should_not_transform_str():
     assert "æøå" == encode_to_utf8("æøå")
コード例 #14
0
ファイル: test_utf8_helpers.py プロジェクト: zware/wee-slack
 def test_encodes_utf8_list_to_unicode():
     assert [b_ae, b_oe, b_aa] == encode_to_utf8(['æ', 'ø', 'å'])
コード例 #15
0
def test_encodes_utf8_string_to_unicode():
    assert b'æøå' == encode_to_utf8(u'æøå')
コード例 #16
0
 def test_encodes_utf8_string_to_unicode():
     assert b_word == encode_to_utf8("æøå")
コード例 #17
0
def test_encodes_utf8_dict_to_unicode():
    assert {b'æ': b'å', b'ø': b'å'} == encode_to_utf8({u'æ': u'å', u'ø': u'å'})
コード例 #18
0
 def test_encodes_utf8_dict_to_unicode():
     assert {b_ae: b_aa, b_oe: b_aa} == encode_to_utf8({"æ": "å", "ø": "å"})
コード例 #19
0
ファイル: test_utf8_helpers.py プロジェクト: qguv/config
 def test_encode_should_not_transform_str():
     assert 'æøå' == encode_to_utf8('æøå')
コード例 #20
0
 def test_encodes_utf8_list_to_unicode():
     assert [b_ae, b_oe, b_aa] == encode_to_utf8(["æ", "ø", "å"])
コード例 #21
0
ファイル: test_utf8_helpers.py プロジェクト: qguv/config
 def test_encode_preserves_string_without_utf8():
     assert b'test' == encode_to_utf8('test')
コード例 #22
0
def test_encode_preserves_string_without_utf8():
    assert b'test' == encode_to_utf8(u'test')
コード例 #23
0
ファイル: test_utf8_helpers.py プロジェクト: qguv/config
 def test_encode_preserves_mapping_type():
     value_dict = {'a': 'x', 'b': 'y', 'c': 'z'}
     value_ord_dict = OrderedDict(value_dict)
     assert type(value_dict) == type(encode_to_utf8(value_dict))
     assert type(value_ord_dict) == type(encode_to_utf8(value_ord_dict))
コード例 #24
0
def test_encode_preserves_byte_strings():
    assert b'æøå' == encode_to_utf8(b'æøå')
コード例 #25
0
ファイル: test_utf8_helpers.py プロジェクト: qguv/config
 def test_encodes_utf8_string_to_unicode():
     assert b_word == encode_to_utf8('æøå')
コード例 #26
0
def test_encode_preserves_mapping_type():
    value_dict = {'a': 'x', 'b': 'y', 'c': 'z'}
    value_ord_dict = OrderedDict(value_dict)
    assert type(value_dict) == type(encode_to_utf8(value_dict))
    assert type(value_ord_dict) == type(encode_to_utf8(value_ord_dict))
コード例 #27
0
ファイル: test_utf8_helpers.py プロジェクト: qguv/config
 def test_encodes_utf8_list_to_unicode():
     assert [b_ae, b_oe, b_aa] == encode_to_utf8(['æ', 'ø', 'å'])
コード例 #28
0
ファイル: test_utf8_helpers.py プロジェクト: zware/wee-slack
 def test_encode_should_not_transform_str():
     assert 'æøå' == encode_to_utf8('æøå')