-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Init test fixture config * Inject Redis into API * Mock redis * Run through simulate e2e fully [caveats] * Capture output files [broken] * Freeze version properly * Add better file storage [broken] * Fix storage * Move file save logic to fixture * Check if valid files * Add both ensemble operations * Add calibrate to E2E tests * Warn if RabbitMQ cannot connect
- Loading branch information
Showing
15 changed files
with
628 additions
and
183 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import json | ||
import os | ||
|
||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def example_context(request): | ||
ctx = {} | ||
chosen = request.node.get_closest_marker("example_dir").args[0] | ||
path_prefix = f"./tests/examples/{chosen}" | ||
with open(f"{path_prefix}/input/request.json", "r") as file: | ||
ctx["request"] = json.load(file) | ||
with open(f"{path_prefix}/output/tds_simulation.json", "r") as file: | ||
ctx["tds_simulation"] = json.load(file) | ||
|
||
def fetch(handle, return_path=False): | ||
io_dir = ( | ||
"input" if os.path.exists(f"{path_prefix}/input/{handle}") else "output" | ||
) | ||
path = f"{path_prefix}/{io_dir}/{handle}" | ||
if return_path: | ||
return os.path.abspath(path) | ||
with open(path, "r") as file: | ||
return file.read() | ||
|
||
ctx["fetch"] = fetch | ||
return ctx |
Empty file.
Oops, something went wrong.