diff --git a/tests/core/test_results.py b/tests/core/test_results.py index 57fbf52f8e..9f7117b681 100644 --- a/tests/core/test_results.py +++ b/tests/core/test_results.py @@ -79,7 +79,7 @@ def test_result_obj_predictions(tmpdir, test_option, do_train, gpus): tutils.reset_seed() dm = TrialMNISTDataModule(tmpdir) - prediction_file = Path('predictions.pt') + prediction_file = Path(tmpdir) / 'predictions.pt' model = EvalModelTemplate() model.test_option = test_option @@ -131,7 +131,7 @@ def test_result_obj_predictions_ddp_spawn(tmpdir): dm = TrialMNISTDataModule(tmpdir) - prediction_file = Path('predictions.pt') + prediction_file = Path(tmpdir) / 'predictions.pt' model = EvalModelTemplate(learning_rate=0.005) model.test_option = option @@ -141,7 +141,7 @@ def test_result_obj_predictions_ddp_spawn(tmpdir): model.test_epoch_end = None model.test_end = None - prediction_files = [Path('predictions_rank_0.pt'), Path('predictions_rank_1.pt')] + prediction_files = [Path(tmpdir) / 'predictions_rank_0.pt', Path(tmpdir) / 'predictions_rank_1.pt'] for prediction_file in prediction_files: if prediction_file.exists(): prediction_file.unlink()