コード例 #1
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_allow_escaped_double_quotes(self):
     self.assertEquals(decode(r'"\""'), '"')
コード例 #2
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_high_unicode(self):
     self.assertEquals(decode('"\U0001f4a9"'), '\U0001f4a9')
コード例 #3
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_left_quotes(self):
     self.assertEquals(decode('" y \N{LEFT DOUBLE QUOTATION MARK}'), ' y ')
コード例 #4
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_natural_number(self):
     self.assertEquals(decode('42'), Decimal('42'))
コード例 #5
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_plenty_of_precision(self):
     self.assertEquals(unicode(decode('6.' + '0' * 100 + '42')),
                       '6.' + '0' * 100 + '42')
コード例 #6
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_false(self):
     self.assertEquals(decode('\N{NO-BREAK SPACE} false'), False)
コード例 #7
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_null_is_case_sensitive(self):
     self.assertEquals(decode('Null'), 'Null')
コード例 #8
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_empty_object(self):
     self.assertEquals(decode(' {} '), {})
コード例 #9
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_empty_list(self):
     self.assertEquals(decode(' []\n'), [])
コード例 #10
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_true(self):
     self.assertEquals(decode('true '), True)
コード例 #11
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_false(self):
     self.assertEquals(decode('\N{NO-BREAK SPACE} false'), False)
コード例 #12
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_null(self):
     self.assertEquals(decode(' null\n'), None)
コード例 #13
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_with_escaped_embedded_whitespace_newlines(self):
     self.assertEquals(decode('"hello\\ \r\n\nworld"'), 'hello\nworld')
コード例 #14
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_with_escaped_embedded_newline(self):
     self.assertEquals(decode('"hello\\\nworld"'), 'helloworld')
コード例 #15
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_with_escaped_embedded_newline(self):
     self.assertEquals(decode('"hello\\\nworld"'), 'helloworld')
コード例 #16
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_empty_list_cant_have_space_inside(self):
     self.assertEquals(decode(' [ ]'), '[ ]')
コード例 #17
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_null(self):
     self.assertEquals(decode(' null\n'), None)
コード例 #18
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_null_is_case_sensitive(self):
     self.assertEquals(decode('Null'), 'Null')
コード例 #19
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_empty_list(self):
     self.assertEquals(decode(' []\n'), [])
コード例 #20
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_true_is_case_sensitive(self):
     self.assertEquals(decode('TRUE'), 'TRUE')
コード例 #21
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_false_is_case_sensitive(self):
     self.assertEquals(decode('falsE'), 'falsE')
コード例 #22
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_false_is_case_sensitive(self):
     self.assertEquals(decode('falsE'), 'falsE')
コード例 #23
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_decimal_number(self):
     self.assertEquals(decode('0.0009'), Decimal('0.0009'))
コード例 #24
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_empty_object_no_internal_whitespace_allowed(self):
     self.assertEquals(decode(' { } '), '{ }')
コード例 #25
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_string_unicode(self):
     self.assertEquals(decode('\N{SNOWMAN}'), '\N{SNOWMAN}')
コード例 #26
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_natural_number(self):
     self.assertEquals(decode('42'), Decimal('42'))
コード例 #27
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_significant_whitespace(self):
     self.assertEquals(decode('"  hello "'), '  hello ')
コード例 #28
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_negative_integer(self):
     self.assertEquals(decode('-9'), Decimal('-9'))
コード例 #29
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_auto_escape_double_quotes_leading_backslash(self):
     self.assertEquals(decode(r'"\\""'), r'\"')
コード例 #30
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_decimal_number(self):
     self.assertEquals(decode('0.0009'), Decimal('0.0009'))
コード例 #31
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_auto_escape_double_quotes_leading_backslash(self):
     self.assertEquals(decode(r'"\\""'), r'\"')
コード例 #32
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_exponent_number(self):
     self.assertEquals(decode('-1.96e-20'), Decimal('-1.96e-20'))
コード例 #33
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_with_escaped_embedded_whitespace_newlines(self):
     self.assertEquals(decode('"hello\\ \r\n\nworld"'), 'hello\nworld')
コード例 #34
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_plenty_of_precision(self):
     self.assertEquals(unicode(decode('6.' + '0' * 100 + '42')),
         '6.' + '0' * 100 + '42')
コード例 #35
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_true(self):
     self.assertEquals(decode('true '), True)
コード例 #36
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_string_single_quote(self):
     self.assertEquals(decode('"'), '"')
コード例 #37
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_empty_object(self):
     self.assertEquals(decode(' {} '), {})
コード例 #38
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_string_unicode(self):
     self.assertEquals(decode('\N{SNOWMAN}'), '\N{SNOWMAN}')
コード例 #39
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_empty_list_cant_have_space_inside(self):
     self.assertEquals(decode(' [ ]'), '[ ]')
コード例 #40
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_unicode(self):
     self.assertEquals(decode('"\N{SNOWMAN}"'), '\N{SNOWMAN}')
コード例 #41
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_true_is_case_sensitive(self):
     self.assertEquals(decode('TRUE'), 'TRUE')
コード例 #42
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_high_unicode(self):
     self.assertEquals(decode('"\U0001f4a9"'), '\U0001f4a9')
コード例 #43
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_empty_object_no_internal_whitespace_allowed(self):
     self.assertEquals(decode(' { } '), '{ }')
コード例 #44
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_escaped_surrogate_pairs(self):
     self.assertEquals(decode(r'"\ud83d\udca9"'), '\U0001f4a9')
コード例 #45
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_negative_integer(self):
     self.assertEquals(decode('-9'), Decimal('-9'))
コード例 #46
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_significant_whitespace(self):
     self.assertEquals(decode('"  hello "'), '  hello ')
コード例 #47
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_exponent_number(self):
     self.assertEquals(decode('-1.96e-20'), Decimal('-1.96e-20'))
コード例 #48
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_right_quotes(self):
     self.assertEquals(decode('\N{RIGHT DOUBLE QUOTATION MARK} o "'), ' o ')
コード例 #49
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_string_single_quote(self):
     self.assertEquals(decode('"'), '"')
コード例 #50
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_left_quotes(self):
     self.assertEquals(decode('" y \N{LEFT DOUBLE QUOTATION MARK}'), ' y ')
コード例 #51
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_unicode(self):
     self.assertEquals(decode('"\N{SNOWMAN}"'), '\N{SNOWMAN}')
コード例 #52
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_auto_escape_double_quotes(self):
     self.assertEquals(decode('"""'),'"')
コード例 #53
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_escaped_surrogate_pairs(self):
     self.assertEquals(decode(r'"\ud83d\udca9"'), '\U0001f4a9')
コード例 #54
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_escaped_backslash(self):
     self.assertEquals(decode(r'"\\"'), '\\')
コード例 #55
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_right_quotes(self):
     self.assertEquals(decode('\N{RIGHT DOUBLE QUOTATION MARK} o "'), ' o ')
コード例 #56
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_escaped_backslash(self):
     self.assertEquals(decode(r'"\\"'), '\\')
コード例 #57
0
ファイル: test_csv_string.py プロジェクト: refset/jsonsquared
 def test_quoted_string_auto_escape_double_quotes(self):
     self.assertEquals(decode('"""'), '"')
コード例 #58
0
ファイル: test_csv_string.py プロジェクト: wardi/jsonsquared
 def test_quoted_string_allow_escaped_double_quotes(self):
     self.assertEquals(decode(r'"\""'), '"')