Skip to content

Commit 58c3cf2

Browse files
digaru19achilleas-k
authored andcommitted
Fix method names in tests
1 parent 927738e commit 58c3cf2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

odml/fileio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
def load(filename, backend="xml"):
77
reader = ODMLReader(backend)
8-
return reader.fromFile(filename)
8+
return reader.from_file(filename)
99

1010

1111
def save(obj, filename, backend="xml"):

test/test_parser.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def setUp(self):
2121
self.yaml_writer = odmlparser.ODMLWriter(parser='YAML')
2222
self.json_writer = odmlparser.ODMLWriter(parser='JSON')
2323

24-
self.odml_doc = self.xml_reader.fromFile(self.basefile)
24+
self.odml_doc = self.xml_reader.from_file(self.basefile)
2525

2626

2727
def tearDown(self):
@@ -38,36 +38,36 @@ def tearDown(self):
3838
def test_xml(self):
3939

4040
self.xml_writer.write_file(self.odml_doc, self.xml_file)
41-
xml_doc = self.xml_reader.fromFile(open(self.xml_file))
41+
xml_doc = self.xml_reader.from_file(open(self.xml_file))
4242

4343
self.assertEqual(xml_doc, self.odml_doc)
4444

4545
def test_yaml(self):
4646

4747
self.yaml_writer.write_file(self.odml_doc, self.yaml_file)
48-
yaml_doc = self.yaml_reader.fromFile(open(self.yaml_file))
48+
yaml_doc = self.yaml_reader.from_file(open(self.yaml_file))
4949

5050
self.assertEqual(yaml_doc, self.odml_doc)
5151

5252

5353
def test_json(self):
5454

5555
self.json_writer.write_file(self.odml_doc, self.json_file)
56-
json_doc = self.json_reader.fromFile(open(self.json_file))
56+
json_doc = self.json_reader.from_file(open(self.json_file))
5757

5858
self.assertEqual(json_doc, self.odml_doc)
5959

6060

6161
def test_json_yaml_xml(self):
6262

6363
self.json_writer.write_file(self.odml_doc, self.json_file)
64-
json_doc = self.json_reader.fromFile(open(self.json_file))
64+
json_doc = self.json_reader.from_file(open(self.json_file))
6565

6666
self.yaml_writer.write_file(json_doc, self.yaml_file)
67-
yaml_doc = self.yaml_reader.fromFile(open(self.yaml_file))
67+
yaml_doc = self.yaml_reader.from_file(open(self.yaml_file))
6868

6969
self.xml_writer.write_file(yaml_doc, self.xml_file)
70-
xml_doc = self.xml_reader.fromFile(open(self.xml_file))
70+
xml_doc = self.xml_reader.from_file(open(self.xml_file))
7171

7272
self.assertEqual(json_doc, self.odml_doc)
7373
self.assertEqual(json_doc, yaml_doc)

0 commit comments

Comments
 (0)