def test_iglob_with_absolute_path_does_not_search_relative_to_working_dir( self, iglob_mock ): workflow = Workflow(working_dir="/some/path") res = list(workflow.iglob("/other/path/*.fa")) self.assertEqual(res, ["/other/path/A.fa", "/other/path/B.fa"]) iglob_mock.assert_called_once_with("/other/path/*.fa")
def test_iglob_with_relative_path_searches_relative_to_working_dir( self, iglob_mock ): workflow = Workflow(working_dir="/some/path") workflow.iglob("*.fa") iglob_mock.assert_called_once_with("/some/path/*.fa")
def test_iglob_with_absolute_path_does_not_search_relative_to_working_dir(self, iglob_mock): workflow = Workflow(working_dir='/some/path') res = list(workflow.iglob('/other/path/*.fa')) self.assertEqual(res, ['/other/path/A.fa', '/other/path/B.fa']) iglob_mock.assert_called_once_with('/other/path/*.fa')
def test_iglob_with_relative_path_searches_relative_to_working_dir(self, iglob_mock): workflow = Workflow(working_dir='/some/path') workflow.iglob('*.fa') iglob_mock.assert_called_once_with('/some/path/*.fa')
def test_iglob_with_absolute_path_does_not_search_relative_to_working_dir( iglob_mock): workflow = Workflow(working_dir="/some/path") res = list(workflow.iglob("/other/path/*.fa")) assert res == ["/other/path/A.fa", "/other/path/B.fa"] iglob_mock.assert_called_once_with("/other/path/*.fa")
def test_iglob_with_relative_path_searches_relative_to_working_dir(iglob_mock): workflow = Workflow(working_dir="/some/path") workflow.iglob("*.fa") iglob_mock.assert_called_once_with("/some/path/*.fa")