We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b95929 commit 793c9b9Copy full SHA for 793c9b9
test/test_samplefile.py
@@ -4,6 +4,7 @@
4
import os
5
import sys
6
import re
7
+import tempfile
8
9
from odml.info import FORMAT_VERSION
10
from odml.tools import xmlparser
@@ -357,9 +358,11 @@ def test_get_property_by_path(self):
357
358
self.assertRaises(ValueError, sec1.get_property_by_path, wrongpath)
359
360
def test_save_version(self):
361
+ tmp_file = os.path.join(tempfile.gettempdir(), "example.odml")
362
+
363
self.doc.version = '2.4'
364
writer = xmlparser.XMLWriter(self.doc)
- writer.write_file("/tmp/example.odml")
365
+ writer.write_file(tmp_file)
366
- restored = xmlparser.load("/tmp/example.odml")
367
+ restored = xmlparser.load(tmp_file)
368
self.assertEqual(self.doc.version, restored.version)
0 commit comments