@@ -11,11 +11,11 @@ def test_find_file_in_zip_no_xml_file(self):
1111 badzip = zipfile .ZipFile (BAD_ZIP_FILE )
1212 self .assertIsNone (find_file_in_zip (badzip ))
1313
14-
1514 def test_only_find_twbs (self ):
1615 twb_from_twbx_with_cache = zipfile .ZipFile (TWBX_WITH_CACHE_FILES )
1716 self .assertEqual (find_file_in_zip (twb_from_twbx_with_cache ), 'Superstore.twb' )
18-
17+
18+
1919class Namespacing (unittest .TestCase ):
2020
2121 def assertContainsUserNamespace (self , filename ):
@@ -27,23 +27,23 @@ def assertContainsUserNamespace(self, filename):
2727 doc_beginning_excerpt += (in_file .readline ().strip ()) # first line should be xml tag
2828 lineCount += 1
2929 found = doc_beginning_excerpt .rfind ("xmlns:user=" )
30- #print(doc_beginning_excerpt[found:found+10])
30+ # print(doc_beginning_excerpt[found:found+10])
3131 self .assertRegex (doc_beginning_excerpt , "xmlns:user=" )
32-
32+
3333 def test_save_preserves_namespace_twb (self ):
34- filename = COMPLEX_TWB
34+ filename = COMPLEX_TWB
3535 self .assertContainsUserNamespace (filename )
3636 wb = Workbook (filename )
3737 new_name = 'saved-as-twb.twb'
3838 wb .save_as (new_name )
3939 self .assertContainsUserNamespace (new_name )
4040
41- '''
41+ '''
4242 def demo_bug_ns_not_preserved_if_not_used(self):
4343 filename = TABLEAU_10_TDS
4444 self.assertContainsUserNamespace(filename)
4545 wb = Datasource.from_file(filename)
46- #wb.save()
46+ #wb.save()
4747 new_name = 'saved-as-tds.tds'
4848 wb.save_as(new_name)
4949 self.assertContainsUserNamespace(new_name) <- throws
@@ -52,8 +52,7 @@ def demo_bug_ns_not_preserved_if_not_used(self):
5252 none will be added.
5353 If there is a namespace but it *is not used* in the document, it will be stripped
5454
55- Fix will be something like
55+ Fix will be something like
5656 https://stackoverflow.com/questions/41937624/elementtree-why-are-my-namespace-declarations-stripped-out
5757
5858 '''
59-
0 commit comments