def test_invalid_run_arguments(self): bad_file = HeaderFile(self.Path('file', Root.srcdir), lang=self.lang) with self.assertRaises(TypeError): self.tool.run_arguments(bad_file) with mock.patch('bfg9000.shell.which', return_value=['command']), \ self.assertRaises(TypeError): self.env.run_arguments(bad_file)
def test_invalid_run_arguments(self): bad_file = HeaderFile(Path('file', Root.srcdir), lang=self.lang) with self.assertRaises(TypeError): self.tool.run_arguments(bad_file) with mock.patch('bfg9000.shell.which', mock_which), \ self.assertRaises(TypeError): # noqa self.env.run_arguments(bad_file)
def test_default_name(self): hdr = HeaderFile(Path('file.hpp', Root.srcdir), 'c++') self.assertEqual(self.compiler.default_name(hdr, None), 'file.hpp')