Example #1
0
 def test_load_config(self):
     data = {"files": [{"label": "EIDA50", "pattern": "~/cache/*.nc"}]}
     with open(self.path, "w") as stream:
         yaml.dump(data, stream)
     result = forest.load_config(self.path).data
     expect = data
     self.assertEqual(expect, result)
Example #2
0
 def test_patterns(self):
     data = {"files": []}
     with open(self.path, "w") as stream:
         yaml.dump(data, stream)
     config = forest.load_config(self.path)
     result = config.patterns
     expect = []
     self.assertEqual(expect, result)
Example #3
0
 def setUp(self):
     path = os.path.join(os.path.dirname(__file__), '../forest/config.yaml')
     self.config = forest.load_config(path)