Skip to content

Commit

Permalink
emb_test cases fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AshishMahendra committed Mar 22, 2024
1 parent 413a882 commit 0e9fd62
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Binary file added src/tests/fixtures/data.zip
Binary file not shown.
18 changes: 16 additions & 2 deletions src/tests/test_emb_sim_eval.jac
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ test test_model_selection {
shutil.unpack_archive(
os.path.join(os.path.dirname(__file__), "fixtures", "config.zip"), "."
);

shutil.unpack_archive(
os.path.join(os.path.dirname(__file__), "fixtures", "data.zip"), "."
);
app = AppTest.from_file("app.py").run(timeout=20);
app.session_state.admin_privileges = True;
app.run();
Expand All @@ -36,6 +38,7 @@ test test_model_selection {

human_eval = Path(os.path.abspath(".human_eval_config"));
if human_eval.exists(){shutil.rmtree(human_eval);}
shutil.rmtree("data");

}

Expand All @@ -44,6 +47,9 @@ test test_embedder_type_selection {
shutil.unpack_archive(
os.path.join(os.path.dirname(__file__), "fixtures", "config.zip"), "."
);
shutil.unpack_archive(
os.path.join(os.path.dirname(__file__), "fixtures", "data.zip"), "."
);
app = AppTest.from_file("app.py").run(timeout=20);
app.session_state.admin_privileges = True;
app.run();
Expand All @@ -58,13 +64,16 @@ test test_embedder_type_selection {

human_eval = Path(os.path.abspath(".human_eval_config"));
if human_eval.exists(){shutil.rmtree(human_eval);}
shutil.rmtree("data");
}

test test_scorer_selection {
shutil.unpack_archive(
os.path.join(os.path.dirname(__file__), "fixtures", "config.zip"), "."
);

shutil.unpack_archive(
os.path.join(os.path.dirname(__file__), "fixtures", "data.zip"), "."
);
app = AppTest.from_file("app.py").run(timeout=20);
app.session_state.admin_privileges = True;
app.run();
Expand All @@ -80,12 +89,16 @@ test test_scorer_selection {

human_eval = Path(os.path.abspath(".human_eval_config"));
if human_eval.exists(){shutil.rmtree(human_eval);}
shutil.rmtree("data");
}

test test_embedding_score_calculation {
shutil.unpack_archive(
os.path.join(os.path.dirname(__file__), "fixtures", "config.zip"), "."
);
shutil.unpack_archive(
os.path.join(os.path.dirname(__file__), "fixtures", "data.zip"), "."
);
app = AppTest.from_file("app.py").run(timeout=20);
app.session_state.admin_privileges = True;
app.run();
Expand All @@ -98,4 +111,5 @@ test test_embedding_score_calculation {

human_eval = Path(os.path.abspath(".human_eval_config"));
if human_eval.exists(){shutil.rmtree(human_eval);}
# shutil.rmtree("data");
}

0 comments on commit 0e9fd62

Please sign in to comment.