File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ dependencies = [
53
53
[project .optional-dependencies ]
54
54
test = [
55
55
" pytest >=6" ,
56
+ " pytest-asyncio" ,
56
57
" scikit-hep-testdata" ,
57
58
]
58
59
iterm = [
@@ -87,6 +88,7 @@ filterwarnings = [
87
88
]
88
89
log_cli_level = " info"
89
90
testpaths = [" tests" ]
91
+ asyncio_mode = " auto"
90
92
91
93
92
94
[tool .mypy ]
Original file line number Diff line number Diff line change
1
+ from pathlib import Path
2
+
3
+ import skhep_testdata
4
+
5
+ from uproot_browser .tui .browser import Browser
6
+
7
+
8
+ async def test_browse_logo () -> None :
9
+ async with Browser (
10
+ Path (skhep_testdata .data_path ("uproot-Event.root" ))
11
+ ).run_test () as pilot :
12
+ assert pilot .app .query_one ("#main-view" ).current == "logo"
13
+
14
+
15
+ async def test_browse_plot () -> None :
16
+ async with Browser (
17
+ Path (skhep_testdata .data_path ("uproot-Event.root" ))
18
+ ).run_test () as pilot :
19
+ await pilot .press ("down" , "down" , "down" , "enter" )
20
+ assert pilot .app .query_one ("#main-view" ).current == "plot"
21
+
22
+
23
+ async def test_browse_empty () -> None :
24
+ async with Browser (
25
+ Path (skhep_testdata .data_path ("uproot-empty.root" ))
26
+ ).run_test () as pilot :
27
+ await pilot .press ("down" , "space" , "down" , "enter" )
28
+ assert pilot .app .query_one ("#main-view" ).current == "empty"
29
+
30
+
31
+ async def test_browse_empty_vim () -> None :
32
+ async with Browser (
33
+ Path (skhep_testdata .data_path ("uproot-empty.root" ))
34
+ ).run_test () as pilot :
35
+ await pilot .press ("j" , "l" , "j" , "enter" )
36
+ assert pilot .app .query_one ("#main-view" ).current == "empty"
You can’t perform that action at this time.
0 commit comments