@@ -68,6 +68,39 @@ def test_xml_file(self):
68
68
69
69
self .assertEqual (xml_doc , self .odml_doc )
70
70
71
+ def test_xml_file_kwargs (self ):
72
+ # Check unsupported kwargs
73
+ self .xml_writer .write_file (self .odml_doc , self .xml_file ,
74
+ invalid_a = False , invalid_b = None , invalid_c = "naughty" )
75
+ xml_doc = self .xml_reader .from_file (self .xml_file )
76
+
77
+ self .assertEqual (xml_doc , self .odml_doc )
78
+
79
+ # Check invalid local_style
80
+ self .xml_writer .write_file (self .odml_doc , self .xml_file , local_style = "this is not good" )
81
+ xml_doc = self .xml_reader .from_file (self .xml_file )
82
+
83
+ self .assertEqual (xml_doc , self .odml_doc )
84
+
85
+ # Check valid local_style
86
+ self .xml_writer .write_file (self .odml_doc , self .xml_file , local_style = True )
87
+ xml_doc = self .xml_reader .from_file (self .xml_file )
88
+
89
+ self .assertEqual (xml_doc , self .odml_doc )
90
+
91
+ # Check invalid custom template
92
+ self .xml_writer .write_file (self .odml_doc , self .xml_file , custom_template = True )
93
+ xml_doc = self .xml_reader .from_file (self .xml_file )
94
+
95
+ self .assertEqual (xml_doc , self .odml_doc )
96
+
97
+ # Check custom template
98
+ custom = "<xsl:template></xsl:template>"
99
+ self .xml_writer .write_file (self .odml_doc , self .xml_file , custom_template = custom )
100
+ xml_doc = self .xml_reader .from_file (self .xml_file )
101
+
102
+ self .assertEqual (xml_doc , self .odml_doc )
103
+
71
104
def test_yaml_file (self ):
72
105
self .yaml_writer .write_file (self .odml_doc , self .yaml_file )
73
106
yaml_doc = self .yaml_reader .from_file (self .yaml_file )
0 commit comments