From 6a4b00a3f0ef530dbfda6b40947833897aa1bec8 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Wed, 16 Nov 2016 12:50:35 -0500 Subject: [PATCH] Remove StringIO from test_diff_tally --- tests/test_diff_tally/test_diff_tally.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/test_diff_tally/test_diff_tally.py b/tests/test_diff_tally/test_diff_tally.py index c5a0762a6..36287a66a 100644 --- a/tests/test_diff_tally/test_diff_tally.py +++ b/tests/test_diff_tally/test_diff_tally.py @@ -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()