@@ -71,9 +71,7 @@ async def test_async_walk_bfs_and_dedupes():
7171 },
7272 {"id" : "c" , "children" : []},
7373 ]
74- tp = AsyncThemeParks (
75- transport = httpx .MockTransport (sequential_handler (responses )), cache = False
76- )
74+ tp = AsyncThemeParks (transport = httpx .MockTransport (sequential_handler (responses )), cache = False )
7775 ids = [c .id async for c in tp .entity ("root" ).walk ()]
7876 assert ids == ["a" , "b" , "c" ]
7977
@@ -83,9 +81,7 @@ async def test_async_schedule_month():
8381 transport = httpx .MockTransport (
8482 by_path (
8583 {
86- "/v1/entity/abc/schedule/2026/4" : {
87- "schedule" : [_entry ("2026-04-01" )]
88- },
84+ "/v1/entity/abc/schedule/2026/4" : {"schedule" : [_entry ("2026-04-01" )]},
8985 }
9086 )
9187 ),
@@ -100,23 +96,15 @@ async def test_async_schedule_range_fanout_and_sort():
10096 transport = httpx .MockTransport (
10197 by_path (
10298 {
103- "/v1/entity/abc/schedule/2026/3" : {
104- "schedule" : [_entry ("2026-03-31" )]
105- },
106- "/v1/entity/abc/schedule/2026/4" : {
107- "schedule" : [_entry ("2026-04-15" )]
108- },
109- "/v1/entity/abc/schedule/2026/5" : {
110- "schedule" : [_entry ("2026-05-01" )]
111- },
99+ "/v1/entity/abc/schedule/2026/3" : {"schedule" : [_entry ("2026-03-31" )]},
100+ "/v1/entity/abc/schedule/2026/4" : {"schedule" : [_entry ("2026-04-15" )]},
101+ "/v1/entity/abc/schedule/2026/5" : {"schedule" : [_entry ("2026-05-01" )]},
112102 }
113103 )
114104 ),
115105 cache = False ,
116106 )
117- entries = await tp .entity ("abc" ).schedule .range (
118- date (2026 , 3 , 20 ), date (2026 , 5 , 10 )
119- )
107+ entries = await tp .entity ("abc" ).schedule .range (date (2026 , 3 , 20 ), date (2026 , 5 , 10 ))
120108 assert [e .date for e in entries ] == ["2026-03-31" , "2026-04-15" , "2026-05-01" ]
121109
122110
@@ -165,13 +153,9 @@ async def handler_inner(req: httpx.Request) -> httpx.Response:
165153 },
166154 )
167155 # Leaves: empty children list
168- return httpx .Response (
169- 200 , json = {"id" : path .rsplit ("/" , 2 )[1 ], "children" : []}
170- )
156+ return httpx .Response (200 , json = {"id" : path .rsplit ("/" , 2 )[1 ], "children" : []})
171157
172- tp = AsyncThemeParks (
173- transport = httpx .MockTransport (handler_inner ), cache = False
174- )
158+ tp = AsyncThemeParks (transport = httpx .MockTransport (handler_inner ), cache = False )
175159 start = time .monotonic ()
176160 ids = [c .id async for c in tp .entity ("root" ).walk ()]
177161 elapsed = time .monotonic () - start
@@ -216,13 +200,9 @@ async def handler_inner(req: httpx.Request) -> httpx.Response:
216200 ],
217201 },
218202 )
219- return httpx .Response (
220- 200 , json = {"id" : path .rsplit ("/" , 2 )[1 ], "children" : []}
221- )
203+ return httpx .Response (200 , json = {"id" : path .rsplit ("/" , 2 )[1 ], "children" : []})
222204
223- tp = AsyncThemeParks (
224- transport = httpx .MockTransport (handler_inner ), cache = False
225- )
205+ tp = AsyncThemeParks (transport = httpx .MockTransport (handler_inner ), cache = False )
226206 ids = [c .id async for c in tp .entity ("root" ).walk (concurrency = 2 )]
227207 assert len (ids ) == 10
228208 assert peak_in_flight <= 2
0 commit comments