mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
Remove StringIO from test_diff_tally
This commit is contained in:
parent
24ae87ea4c
commit
6a4b00a3f0
1 changed files with 1 additions and 8 deletions
|
|
@ -2,10 +2,6 @@
|
|||
|
||||
import glob
|
||||
import os
|
||||
try:
|
||||
from StringIO import StringIO
|
||||
except:
|
||||
from io import StringIO
|
||||
import sys
|
||||
|
||||
import pandas as pd
|
||||
|
|
@ -129,12 +125,9 @@ class DiffTallyTestHarness(PyAPITestHarness):
|
|||
df = df.append(t.get_pandas_dataframe(), ignore_index=True)
|
||||
|
||||
# Extract the relevant data as a CSV string.
|
||||
out = StringIO()
|
||||
cols = ('d_material', 'd_nuclide', 'd_variable', 'score', 'mean',
|
||||
'std. dev.')
|
||||
df.to_csv(out, columns=cols, index=False, float_format='%.7e')
|
||||
|
||||
return out.getvalue()
|
||||
return df.to_csv(None, columns=cols, index=False, float_format='%.7e')
|
||||
|
||||
def _cleanup(self):
|
||||
super(DiffTallyTestHarness, self)._cleanup()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue