Spaces:
Sleeping
Sleeping
rmm
commited on
Commit
·
e9482cd
1
Parent(s):
8963e74
test: updated test to match removed heading in whale_viewer
Browse files
tests/test_demo_whale_viewer.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from streamlit.testing.v1 import AppTest
|
2 |
import pytest # for the exception testing
|
3 |
|
4 |
-
import whale_viewer
|
5 |
|
6 |
|
7 |
def test_selectbox_ok():
|
@@ -27,7 +27,7 @@ def test_selectbox_ok():
|
|
27 |
assert at.markdown[0].value == "Selected species: beluga"
|
28 |
# the second markdown should be "### :whale: #1: Beluga"
|
29 |
print("markdown 1: ", at.markdown[1].value)
|
30 |
-
assert at.markdown[1].value == "
|
31 |
|
32 |
# now let's select a different element. index 4 is commersons_dolphin
|
33 |
v4 = "commersons_dolphin"
|
@@ -39,7 +39,7 @@ def test_selectbox_ok():
|
|
39 |
# the first markdown should be "Selected species: commersons_dolphin"
|
40 |
assert at.markdown[0].value == f"Selected species: {v4}"
|
41 |
# the second markdown should be "### :whale: #1: Commersons Dolphin"
|
42 |
-
assert at.markdown[1].value == f"
|
43 |
|
44 |
# test there are the right number of options
|
45 |
print("PROPS=> ", dir(at.selectbox[0])) # no length unfortunately,
|
|
|
1 |
from streamlit.testing.v1 import AppTest
|
2 |
import pytest # for the exception testing
|
3 |
|
4 |
+
import whale_viewer # for data
|
5 |
|
6 |
|
7 |
def test_selectbox_ok():
|
|
|
27 |
assert at.markdown[0].value == "Selected species: beluga"
|
28 |
# the second markdown should be "### :whale: #1: Beluga"
|
29 |
print("markdown 1: ", at.markdown[1].value)
|
30 |
+
assert at.markdown[1].value == ":whale: #1: Beluga"
|
31 |
|
32 |
# now let's select a different element. index 4 is commersons_dolphin
|
33 |
v4 = "commersons_dolphin"
|
|
|
39 |
# the first markdown should be "Selected species: commersons_dolphin"
|
40 |
assert at.markdown[0].value == f"Selected species: {v4}"
|
41 |
# the second markdown should be "### :whale: #1: Commersons Dolphin"
|
42 |
+
assert at.markdown[1].value == f":whale: #1: {v4_str}"
|
43 |
|
44 |
# test there are the right number of options
|
45 |
print("PROPS=> ", dir(at.selectbox[0])) # no length unfortunately,
|