

def test_file_missing(self):
    path = os.path.join(self.temp, 'afile')
    self.assertRaises(errors.BadArgumentFormat, self.run_conv, converters.file(), path)

    @modifiers.annotate(afile=converters.file())
    def func(afile):
        raise NotImplementedError
    (stdout, stderr) = self.crun(func, ['test', path])
    self.assertFalse(stdout.getvalue())
    self.assertTrue(stderr.getvalue().startswith('test: Bad value for afile: File does not exist: '))

dataset/ETHPy150Open epsy/clize/clize/tests/test_converters.py FileConverterTests.test_file_missing/original