File tree 2 files changed +4
-4
lines changed
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:
239
239
"""
240
240
root = self .to_element ()
241
241
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):
40
40
41
41
42
42
@pytest .mark .parametrize ('copyright, expose' , [
43
- pytest .param ('copyright © genrss' , 'copyright © genrss' , id = 'copy' ),
43
+ pytest .param ('copyright © genrss' , 'copyright © genrss' , id = 'copy' ),
44
44
])
45
45
def test_feed_copyright (copyright , expose ):
46
46
feed = create_rss (copyright = copyright )
You can’t perform that action at this time.
0 commit comments