Skip to content

Commit 3cdf03d

Browse files
author
Sylvain MARIE
committed
Merge remote-tracking branch 'origin/master'
2 parents aab9b41 + 719fbba commit 3cdf03d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pytest_harvest/plugin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,10 @@ def get_session_results_df(session_or_request,
270270
return results_df
271271

272272
except ImportError as e:
273+
saved_e = e
273274
def get_session_results_df(*args, **kwargs):
274275
six.raise_from(Exception("There was an error importing `pandas` module. Fixture `session_results_df` and method"
275-
"`get_session_results_df` can not be used in this session."), e)
276+
"`get_session_results_df` can not be used in this session."), saved_e)
276277

277278

278279
@pytest.fixture(scope='function')
@@ -343,10 +344,11 @@ def get_filtered_results_df(session,
343344
return results_df
344345

345346
except ImportError as e:
347+
saved_e = e
346348
def get_filtered_results_df(*args, **kwargs):
347349
six.raise_from(Exception("There was an error importing `pandas` module. Fixture `session_results_df` and "
348350
"methods `get_filtered_results_df` and `get_module_results_df` can not be used in this"
349-
" session. "), e)
351+
" session. "), saved_e)
350352

351353

352354
def get_module_results_df(session,

0 commit comments

Comments
 (0)