File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,6 @@ def xml(self, pretty: bool = False) -> str:
239239 """
240240 root = self .to_element ()
241241
242- return '<?xml version="1.0" encoding="UTF-8"?> \n ' \
243- + ( ' \n ' if pretty else '' ) \
244- + tostring ( root , pretty_print = pretty ). decode ('utf-8' )
242+ return tostring ( root , pretty_print = pretty , xml_declaration = True ,
243+ encoding = 'UTF-8' ). \
244+ decode ('utf-8' )
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def test_feed_description(description, expose):
4040
4141
4242@pytest .mark .parametrize ('copyright, expose' , [
43- pytest .param ('copyright © genrss' , 'copyright © genrss' , id = 'copy' ),
43+ pytest .param ('copyright © genrss' , 'copyright © genrss' , id = 'copy' ),
4444])
4545def test_feed_copyright (copyright , expose ):
4646 feed = create_rss (copyright = copyright )
You can’t perform that action at this time.
0 commit comments