Skip to content

Commit

Permalink
introduce first test for streamlit app
Browse files Browse the repository at this point in the history
  • Loading branch information
joAschauer committed Nov 16, 2023
1 parent 0b01f6c commit 08fbf66
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion requirements.txt
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
17 changes: 17 additions & 0 deletions tests/test_ptxboa_streamlit.py
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

0 comments on commit 08fbf66

Please sign in to comment.