class Test_XmlConfigParser_windows(B3TestCase): def setUp(self): B3TestCase.setUp(self) self.conf = XmlConfigParser() self.conf.setXml(""" <configuration plugin="test"> <settings name="settings"> <set name="output_file">@conf/status.xml</set> </settings> </configuration> """) def test_getpath(self): self.console.config.fileName = r"c:\some\where\conf\b3.xml" self.assertEqual(r"c:\some\where\conf\status.xml", self.conf.getpath('settings', 'output_file')) def test_issue_xlr8or_18(self): self.console.config.fileName = r"b3.xml" self.assertEqual(r"status.xml", self.conf.getpath('settings', 'output_file'))
class Test_XmlConfigParser_outputfile(B3TestCase): def setUp(self): B3TestCase.setUp(self) self.conf = XmlConfigParser() self.conf.setXml(""" <configuration plugin="test"> <settings name="settings"> <set name="output_file">@conf/status.xml</set> </settings> </configuration> """) def test_getpath(self): status_file = os.path.join("tmp", "status.xml") self.console.config.fileName = os.path.join("tmp", "b3.xml") self.assertEqual(status_file, self.conf.getpath('settings', 'output_file')) def test_issue_xlr8or_18(self): self.console.config.fileName = r"b3.xml" self.assertEqual(r"status.xml", self.conf.getpath('settings', 'output_file'))