File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -14,17 +14,18 @@ class TestPlotLog(unittest.TestCase):
14
14
def test (self ):
15
15
# this tests two things:
16
16
# 1) gen_phold_space_time_plot.py
17
- # 2) the use of self.fast_plot_file_logger in de_sim/de_sim/simulation_object.py, which cannot be conveniently
18
- # unit-tested because doing so requires that config state be changed before de_sim.plot.file logger is created
19
- # we run gen_phold_space_time_plot.py in a separate process to execute that code
20
- # also see comment LoggerConfigurator().from_dict() regarding shared loggers
17
+ # 2) the use of self.fast_plot_file_logger in de_sim/de_sim/simulation_object.py, which cannot
18
+ # be conveniently unit-tested because doing so requires that config state be changed before
19
+ # de_sim.plot.file logger is created we run gen_phold_space_time_plot.py in a separate process
20
+ # to execute that code.
21
+ # also see the comment in LoggerConfigurator().from_dict() regarding shared loggers.
21
22
try :
22
23
command = ["python3" , "joss_paper/gen_phold_space_time_plot.py" ]
23
24
result = subprocess .run (command ,
24
25
check = True ,
25
26
capture_output = True )
26
- except CalledProcessError as e :
27
- e_msg = f"""'{ " " .join (command )} ' failed: { e .stderr } """
27
+ except subprocess . CalledProcessError as e :
28
+ e_msg = f"""'{ " " .join (command )} ' failed:\n { e .stderr . decode ( "utf-8" ) } """
28
29
self .fail (e_msg )
29
30
30
31
self .assertIn ('space-time diagram written' , result .stdout .decode ("utf-8" ))
You can’t perform that action at this time.
0 commit comments