From d3db48e06e1aecad22b4afb779ed9f23abb8ea0b Mon Sep 17 00:00:00 2001 From: XianBW <36835909+XianBW@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:33:46 +0800 Subject: [PATCH] fix: test kaggle method (#296) * fix test kaggle * add hint for kaggle template test --- test/utils/test_kaggle.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/utils/test_kaggle.py b/test/utils/test_kaggle.py index bd6e2693..cadb7dd1 100644 --- a/test/utils/test_kaggle.py +++ b/test/utils/test_kaggle.py @@ -13,18 +13,21 @@ from rdagent.utils.agent.tpl import T class TestTpl(unittest.TestCase): def test_competition_template(self): + """ + export KG_COMPETITION= before running this test + """ competition = KAGGLE_IMPLEMENT_SETTING.competition print(f"[bold orange]{competition}[/bold orange]") ws = KGFBWorkspace( template_folder_path=Path(__file__).parent.parent.parent / "rdagent/scenarios/kaggle/experiment" - / f"{KAGGLE_IMPLEMENT_SETTING.competition}_template" + / f"{competition}_template" ) print(ws.workspace_path) ws.execute() success = (ws.workspace_path / "submission.csv").exists() + self.assertTrue(success, "submission.csv is not generated") ws.clear() - return success if __name__ == "__main__":