Skip to content

Commit fdd815d

Browse files
committed
[DF] Clean up output file after a Snapshot test
`NeverWrittenOut.root` is actually written out (because the exception is thrown during the event loop). Change the file name and delete it at the end of the test.
1 parent cdc4ab4 commit fdd815d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tree/dataframe/test/dataframe_snapshot.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ TEST(RDFSnapshotMore, MissingSizeBranch)
897897
ROOT::RDataFrame df("t", inFile);
898898

899899
// fully typed Snapshot call throws
900-
EXPECT_THROW(df.Snapshot<ROOT::RVecF>("t", "NeverWrittenOut.root", {"vec"}), std::runtime_error);
900+
EXPECT_THROW(df.Snapshot<ROOT::RVecF>("t", outFile, {"vec"}), std::runtime_error);
901901

902902
// jitted Snapshot works anyway
903903
auto out = df.Snapshot("t", outFile, {"vec"});
@@ -913,6 +913,7 @@ TEST(RDFSnapshotMore, MissingSizeBranch)
913913
EXPECT_TRUE(All(vecs->at(2) == ROOT::RVecF{1, 2, 3}));
914914

915915
gSystem->Unlink(inFile);
916+
gSystem->Unlink(outFile);
916917
}
917918

918919
TEST(RDFSnapshotMore, OutOfOrderSizeBranch)

0 commit comments

Comments
 (0)