55import pytest
66from bs4 import BeautifulSoup
77
8- from psc .resources import Example , get_sorted_examples
8+ from psc .resources import Example
99from psc .resources import Page
1010from psc .resources import get_body_content
1111from psc .resources import get_head_nodes
1212from psc .resources import get_resources
13+ from psc .resources import get_sorted_examples
1314from psc .resources import is_local
1415from psc .resources import tag_filter
1516
17+
1618IS_LOCAL = is_local ()
1719
1820
@@ -116,8 +118,8 @@ def test_example() -> None:
116118 this_example = Example (path = PurePath ("hello_world" ))
117119 assert this_example .title == "Hello World"
118120 assert (
119- this_example .subtitle
120- == "The classic hello world, but in Python -- in a browser!"
121+ this_example .subtitle
122+ == "The classic hello world, but in Python -- in a browser!"
121123 )
122124 assert "hello_world.css" in this_example .extra_head
123125 assert "<h1>Hello ...</h1>" in this_example .body
@@ -153,6 +155,7 @@ def test_missing_page() -> None:
153155
154156
155157def test_sorted_examples () -> None :
158+ """Ensure a stable listing."""
156159 examples = get_sorted_examples ()
157160 first_example = examples [0 ]
158161 assert "altair" == first_example .name
@@ -167,8 +170,8 @@ def test_get_resources() -> None:
167170 hello_world = resources .examples [hello_world_path ]
168171 assert hello_world .title == "Hello World"
169172 assert (
170- hello_world .subtitle
171- == "The classic hello world, but in Python -- in a browser!"
173+ hello_world .subtitle
174+ == "The classic hello world, but in Python -- in a browser!"
172175 )
173176
174177 # Page
0 commit comments