-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
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,20 @@ | ||
from streamlit.testing.v1 import AppTest | ||
from pathlib import Path | ||
from unittest.mock import MagicMock, patch | ||
import pandas as pd | ||
from io import BytesIO | ||
|
||
def print_session_state(apptest: AppTest): | ||
for k,v in apptest.session_state.filtered_state.items(): | ||
print(f"{k}: {str(type(v))} {str(v)[:20] if type(v) not in [int, list, str] else v}") | ||
|
||
APP_FOLDER = Path(__file__).parent / Path("../") | ||
APP_FILE = f"{APP_FOLDER}/pages/03_Data Overview.py" | ||
TEST_INPUT_FILES = f"{APP_FOLDER}/../../testfiles" | ||
|
||
def test_page_03_loads_without_input(): | ||
"""Test if the page loads without any input and inititalizes the session state with the correct values.""" | ||
at = AppTest(APP_FILE, default_timeout=200) | ||
at.run() | ||
|
||
assert not at.exception |