File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 20
20
import logging
21
21
import os
22
22
from copy import deepcopy
23
+ from sys import version_info
24
+ from unittest import skipIf
23
25
24
26
from defusedxml import ElementTree as SafeElementTree
25
27
@@ -88,12 +90,13 @@ def test_serializable_no_defaultNS(self) -> None:
88
90
data .as_xml (as_string = False , xmlns = xmlns ),
89
91
method = 'xml' ,
90
92
encoding = 'unicode' ,
91
- default_namespace = None
93
+ # default_namespace=None
92
94
)
93
95
# byte-wise string compare is intentional!
94
96
self .maxDiff = None
95
97
self .assertEqual (expected , actual )
96
98
99
+ @skipIf (version_info < (3 ,8 ), '`ElementTree.tostring(default_namespace=)` not available' )
97
100
def test_serializable_with_defaultNS (self ) -> None :
98
101
"""regression test for https://github.com/madpah/serializable/issues/12"""
99
102
from xml .etree import ElementTree
You can’t perform that action at this time.
0 commit comments