-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce first test for streamlit app
- Loading branch information
1 parent
0b01f6c
commit 08fbf66
Showing
2 changed files
with
18 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
pandas~=2.1 | ||
numpy~=1.25 | ||
streamlit~=1.26 | ||
streamlit>=1.28 | ||
openpyxl~=3.1 | ||
plotly~=5.16 | ||
faker~=18.9 |
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,17 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Tests for the streamlit app.""" | ||
import pytest | ||
from streamlit.testing.v1 import AppTest | ||
|
||
|
||
@pytest.fixture | ||
def running_app(): | ||
"""Fixture that returns a fresh instance of a running app.""" | ||
at = AppTest.from_file("ptxboa_streamlit.py") | ||
at.run(timeout=20) | ||
return at | ||
|
||
|
||
def test_app_smoke(running_app): | ||
"""Test if the app starts up without errors.""" | ||
assert not running_app.exception |