File tree Expand file tree Collapse file tree 1 file changed +10
-24
lines changed Expand file tree Collapse file tree 1 file changed +10
-24
lines changed Original file line number Diff line number Diff line change 5
5
import polars as pl
6
6
from plotly import io
7
7
8
- HIDE_PLOT = os .environ .get ("LACE_DOCTEST_NOPLOT" , "0" ) == "1"
8
+ NOPLOT = os .environ .get ("LACE_DOCTEST_NOPLOT" , "0" ) == "1"
9
9
10
10
11
- if HIDE_PLOT :
12
- # io.renderers.default = 'json'
13
- io .renderers .default = "iframe"
11
+ if NOPLOT :
12
+ io .renderers .default = "json"
14
13
15
14
16
15
pl .Config (tbl_rows = 8 )
@@ -24,28 +23,15 @@ def copy(self):
24
23
return self
25
24
26
25
27
- def plot ( ):
28
- module = import_module ("lace.plot" )
26
+ def runtest ( mod ):
27
+ module = import_module (mod )
29
28
extraglobs = _Context (module .__dict__ .copy ())
30
-
31
- doctest .testmod (module , extraglobs = extraglobs )
32
-
33
-
34
- def engine ():
35
- module = import_module ("lace.engine" )
36
- extraglobs = _Context (module .__dict__ .copy ())
37
-
38
- doctest .testmod (module , extraglobs = extraglobs )
39
-
40
-
41
- def analysis ():
42
- module = import_module ("lace.analysis" )
43
- extraglobs = _Context (module .__dict__ .copy ())
44
-
45
29
doctest .testmod (module , extraglobs = extraglobs )
46
30
47
31
48
32
if __name__ == "__main__" :
49
- engine ()
50
- analysis ()
51
- plot ()
33
+ runtest ("lace.engine" )
34
+ runtest ("lace.analysis" )
35
+
36
+ if not NOPLOT :
37
+ runtest ("lace.plot" )
You can’t perform that action at this time.
0 commit comments