Пример #1
0
 def test_local_taskfile(self):
     local_taskfile = self.temptaskdir / 'taskfile.py'
     sample_taskfile.copy(local_taskfile)
     assert loader.which(self.temptaskdir).basename() == 'taskfile.py'
     task = loader.use(self.temptaskdir)
     self.assertEqual(task.two()[0], 2.0)
     local_taskfile.unlink()
Пример #2
0
 def test_local_taskfile(self):
     local_taskfile = self.temptaskdir / 'taskfile.py'
     sample_taskfile.copy(local_taskfile)
     assert loader.which(self.temptaskdir).basename() == 'taskfile.py'
     task = loader.use(self.temptaskdir)
     self.assertEqual(task.two()[0], 2.0)
     local_taskfile.unlink()
Пример #3
0
 def test_loader_fail(self):
     self.taskfile.unlink()
     with self.assertRaises(IOError):
         loader.use(self.temptaskdir)
Пример #4
0
 def test_loader(self):
     assert loader.which(self.temptaskdir).basename() == 'taskfile_sub.py'
     task = loader.use(self.temptaskdir)
     self.assertEqual(task.two()[0], 2.0)
Пример #5
0
 def test_loader_fail(self):
     self.taskfile.unlink()
     with self.assertRaises(IOError):
         loader.use(self.temptaskdir)
Пример #6
0
 def test_loader(self):
     assert loader.which(self.temptaskdir).basename() == 'taskfile_sub.py'
     task = loader.use(self.temptaskdir)
     self.assertEqual(task.two()[0], 2.0)