Skip to content

Commit

Permalink
Drop hunting for venv at runtime in unit tests - just expect it to be…
Browse files Browse the repository at this point in the history
… active
  • Loading branch information
PhilMiller committed Dec 27, 2023
1 parent 3ef981e commit 83b3950
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
10 changes: 1 addition & 9 deletions test/bmi/Bmi_Py_Adapter_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,8 @@ void Bmi_Py_Adapter_Test::TearDown() {
}

void Bmi_Py_Adapter_Test::SetUpTestSuite() {
// Add the extern dir with our test lib to Python system path
std::string module_directory = "./extern/";

#if 0
// Add the package dir from a local virtual environment directory also, if there is one
std::string venv_dir = py_dir_search({repo_root + "/.venv", repo_root + "/venv"});
if (!venv_dir.empty()) {
InterpreterUtil::addToPyPath(py_find_venv_site_packages_dir(venv_dir));
}
#endif
// Also add the extern dir with our test lib to Python system path
InterpreterUtil::addToPyPath(module_directory);
}

Expand Down
12 changes: 1 addition & 11 deletions test/realizations/catchments/Bmi_Py_Formulation_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,9 @@ void Bmi_Py_Formulation_Test::SetUp() {
}

void Bmi_Py_Formulation_Test::SetUpTestSuite() {
// Add the extern dir with our test lib to Python system path
std::string module_directory = "./extern/";

#if 0
// Add the package dir from a local virtual environment directory also, if there is one
std::string venv_dir = py_dir_search({repo_root + "/.venv", repo_root + "/venv"});
if (!venv_dir.empty()) {
InterpreterUtil::addToPyPath(py_find_venv_site_packages_dir(venv_dir));
}
#endif
// Also add the extern dir with our test lib to Python system path
InterpreterUtil::addToPyPath(module_directory);


}

void Bmi_Py_Formulation_Test::TearDown() {
Expand Down

0 comments on commit 83b3950

Please sign in to comment.