Skip to content

Commit

Permalink
Page 3 run test
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaS92 committed Aug 30, 2024
1 parent b9be51d commit 2be07c5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions alphastats/gui/test/test_03_data_overview.py
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

0 comments on commit 2be07c5

Please sign in to comment.