def test_glob_with_absolute_path_does_not_search_relative_to_working_dir( self, glob_mock ): workflow = Workflow(working_dir="/some/path") res = workflow.glob("/other/path/*.fa") self.assertEqual(res, ["/other/path/A.fa", "/other/path/B.fa"]) glob_mock.assert_called_once_with("/other/path/*.fa")
def test_glob_with_relative_path_searches_relative_to_working_dir(self, glob_mock): workflow = Workflow(working_dir="/some/path") workflow.glob("*.fa") glob_mock.assert_called_once_with("/some/path/*.fa")
def test_glob_with_absolute_path_does_not_search_relative_to_working_dir(self, glob_mock): workflow = Workflow(working_dir='/some/path') res = workflow.glob('/other/path/*.fa') self.assertEqual(res, ['/other/path/A.fa', '/other/path/B.fa']) glob_mock.assert_called_once_with('/other/path/*.fa')
def test_glob_with_relative_path_searches_relative_to_working_dir(self, glob_mock): workflow = Workflow(working_dir='/some/path') workflow.glob('*.fa') glob_mock.assert_called_once_with('/some/path/*.fa')
def test_glob_with_absolute_path_does_not_search_relative_to_working_dir( glob_mock): workflow = Workflow(working_dir="/some/path") res = workflow.glob("/other/path/*.fa") assert res == ["/other/path/A.fa", "/other/path/B.fa"] glob_mock.assert_called_once_with("/other/path/*.fa")
def test_glob_with_relative_path_searches_relative_to_working_dir(glob_mock): workflow = Workflow(working_dir="/some/path") workflow.glob("*.fa") glob_mock.assert_called_once_with("/some/path/*.fa")