Skip to content

Commit c110e34

Browse files
ueshinHyukjinKwon
authored andcommitted
[SPARK-23319][TESTS][FOLLOWUP] Fix a test for Python 3 without pandas.
## What changes were proposed in this pull request? This is a followup pr of apache#20487. When importing module but it doesn't exists, the error message is slightly different between Python 2 and 3. E.g., in Python 2: ``` No module named pandas ``` in Python 3: ``` No module named 'pandas' ``` So, one test to check an import error fails in Python 3 without pandas. This pr fixes it. ## How was this patch tested? Tested manually in my local environment. Author: Takuya UESHIN <[email protected]> Closes apache#20538 from ueshin/issues/SPARK-23319/fup1.
1 parent ff9ba5e commit c110e34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/sql/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2854,7 +2854,7 @@ def test_create_dataframe_required_pandas_not_found(self):
28542854
with QuietTest(self.sc):
28552855
with self.assertRaisesRegexp(
28562856
ImportError,
2857-
'(Pandas >= .* must be installed|No module named pandas)'):
2857+
"(Pandas >= .* must be installed|No module named '?pandas'?)"):
28582858
import pandas as pd
28592859
from datetime import datetime
28602860
pdf = pd.DataFrame({"ts": [datetime(2017, 10, 31, 1, 1, 1)],

0 commit comments

Comments
 (0)