def test_issue_25_01(self): round_trip("""\ a: # comment 1 # comment 2 - b: # comment 3 c: 1 # comment 4 """)
def test_issue_25a1(self): round_trip("""\ - a: b c: d d: # foo e: f """)
def test_issue_25c(self): round_trip("""\ params: a: 1 # comment a b: # comment b c: 3 # comment c """)
def test_issue_93_00(self): round_trip("""\ a: - - c1: cat # a1 # my comment on catfish - c2: catfish # a2 """)
def test_issue_93_02(self): # never failed as there is no indent round_trip("""\ - c1: cat # my comment on catfish - c2: catfish """)
def test_dropped(self): s = """\ # comment scalar ... """ round_trip(s, 'scalar\n...\n')
def test_embedded_map(self): round_trip(""" - a: 1y b: 2y c: 3y """)
def test_blank_line_after_comment(self): round_trip(""" # Comment with spaces after it. a: 1 """)
def test_normal_timezone(self): round_trip(""" - 2011-10-02T11:45:00-5 - 2011-10-02 11:45:00-5 - 2011-10-02T11:45:00-05:00 - 2011-10-02 11:45:00-05:00 """)
def test_issue_25b(self): round_trip( """\ var1: #empty var2: something #notempty """ )
def test_issue_25_03(self): s = """\ a: # comment 1 # comment 2 - b: 2 # comment 3 """ round_trip(s, indent=4, block_seq_indent=2)
def test_full_tag(self): round_trip("""\ !!tag:yaml.org,2002:python/object:__main__.Developer name: Anthon location: Germany language: python """)
def test_comment_after_block_scalar_indicator(self): round_trip("""\ a: | # abc test 1 test 2 # all done """)
def test_dropped(self): round_trip( """ # comment scalar ... """, "scalar\n...\n")
def test_standard_short_tag(self): round_trip("""\ !!map name: Anthon location: Germany language: python """)
def test_no_comments(self): round_trip(""" - europe: 10 - usa: - ohio: 2 - california: 9 """)
def test_complex(self): round_trip(""" - europe: 10 # top - usa: - ohio: 2 - california: 9 # o """)
def test_map_in_map_0(self): round_trip(""" map1: # comment 1 # comment 2 map2: key1: val1 """)
def test_tag(self): round_trip("""\ !!python/object:__main__.Developer name: Anthon location: Germany language: python """)
def test_Y2(self): round_trip("""\ !!yyy name: Anthon location: Germany language: python """)
def test_simple_map_middle_comment(self): round_trip(""" abc: 1 # C 3a # C 3b ghi: 2 """)
def test_standard_tag(self): round_trip("""\ !!tag:yaml.org,2002:python/object:map name: Anthon location: Germany language: python """)
def test_preserve_string(self): inp = """ a: | abc def """ round_trip(inp, intermediate=dict(a='abc\ndef\n'))
def test_omap_comment_roundtrip(self): round_trip(""" !!omap - a: 1 - b: 2 # two - c: 3 # three - d: 4 """)
def test_no_end_of_file_eol(self): """not excluding comments caused some problems if at the end of the file without a newline. First error, then included \0 """ x = """\ - europe: 10 # abc""" round_trip(x, extra='\n') with pytest.raises(AssertionError): round_trip(x, extra='a\n')
def test_X1(self): register_xxx() round_trip("""\ !xxx name: Anthon location: Germany language: python """)
def test_preserve_string_strip(self): s = """ a: |- abc def """ round_trip(s, intermediate=dict(a='abc\ndef'))
def test_map_in_map_1(self): # comment is moved from value to key round_trip(""" map1: # comment 1 map2: key1: val1 """)
def test_fold_string_keep(self): with pytest.raises(AssertionError) as excinfo: # NOQA round_trip(""" a: >+ abc def """, intermediate=dict(a='abc def\n\n'))
def test_single_doc_begin_end(self): inp = """\ --- - a - b ... """ round_trip(inp, explicit_start=True, explicit_end=True)