Skip to content

Commit a7fd681

Browse files
committed
[SPARK-10392] [SQL] Moving regression test to DataTypeTests class
1 parent f41b125 commit a7fd681

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

python/pyspark/sql/tests.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ def test_decimal_type(self):
167167
t3 = DecimalType(8)
168168
self.assertNotEqual(t2, t3)
169169

170+
# regression test for SPARK-10392
171+
def test_datetype_equal_zero(self):
172+
dt = DateType()
173+
self.assertEqual(dt.fromInternal(0), datetime.date(1970, 1, 1))
174+
170175

171176
class SQLTests(ReusedPySparkTestCase):
172177

@@ -1164,9 +1169,6 @@ def test_window_functions_without_partitionBy(self):
11641169
for r, ex in zip(rs, expected):
11651170
self.assertEqual(tuple(r), ex[:len(r)])
11661171

1167-
def test_datetype_equal_zero(self):
1168-
dt = DateType()
1169-
self.assertEqual(dt.fromInternal(0), datetime.date(1970, 1, 1))
11701172

11711173
if __name__ == "__main__":
11721174
unittest.main()

0 commit comments

Comments
 (0)