File tree Expand file tree Collapse file tree
tests/test_pymcnp/test__cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,16 +129,18 @@ def to_mcnp(self):
129129 # source += f'c {"cells":^76.76}\n'
130130 # source += DELIMITER
131131
132- return f"""
133- { self .message + "\n " if self .message else "" } { self .title }
134- { '\n ' .join (map (str , self .cells ))}
135-
136- { '\n ' .join (map (str , self .surfaces ))}
137-
138- { '\n ' .join (map (str , self .data ))}
139-
140- { self .other if self .other is not None else "" }
141- """ [1 :- 1 ]
132+ return (
133+ (self .message + '\n ' if self .message else '' )
134+ + self .title .value
135+ + '\n '
136+ + '\n ' .join (map (str , self .cells ))
137+ + '\n \n '
138+ + '\n ' .join (map (str , self .surfaces ))
139+ + '\n \n '
140+ + '\n ' .join (map (str , self .data ))
141+ + '\n \n '
142+ + (self .other if self .other is not None else '' )
143+ )
142144
143145 def draw (self ) -> _show .Shape :
144146 """
Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ def test_valid(self):
1414 def test_invalid (self ):
1515 os .system (f"pymcnp plot { pathlib .Path (__file__ ).parent .parent .parent .parent / 'files' / 'outp' / 'invalid_02.outp' } 1" )
1616 os .system (f"pymcnp plot { pathlib .Path (__file__ ).parent .parent .parent .parent / 'files' / 'outp' / 'example_00.outp' } 132423" )
17- os .system (" pymcnp plot hello 1" )
17+ os .system (' pymcnp plot hello 1' )
1818 matplotlib .pyplot .close ()
Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ def test_valid(self):
1212
1313 def test_invalid (self ):
1414 os .system (f"pymcnp visualize { pathlib .Path (__file__ ).parent .parent .parent .parent / 'files' / 'inp' / 'invalid_00.inp' } " )
15- os .system (f" pymcnp visualize hello" )
15+ os .system (' pymcnp visualize hello' )
You can’t perform that action at this time.
0 commit comments