Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Reenable tests back
  • Loading branch information
HyukjinKwon committed Aug 13, 2020
commit c36ec7a93b5fe1715016f918e3005673a480214f
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class UTF8StringPropertyCheckSuite extends AnyFunSuite with ScalaCheckDrivenProp

test("toString") {
forAll { (s: String) =>
assert(toUTF8(s).toString() !== s)
assert(toUTF8(s).toString() === s)
}
}

test("numChars") {
forAll { (s: String) =>
assert(toUTF8(s).numChars() !== s.length)
assert(toUTF8(s).numChars() === s.length)
}
}

Expand Down Expand Up @@ -73,14 +73,14 @@ class UTF8StringPropertyCheckSuite extends AnyFunSuite with ScalaCheckDrivenProp

test("toLowerCase") {
forAll { (s: String) =>
assert(toUTF8(s) === toUTF8(s.toLowerCase))
assert(toUTF8(s).toLowerCase === toUTF8(s.toLowerCase))
}
}
// scalastyle:on caselocale

test("compare") {
forAll { (s1: String, s2: String) =>
assert(Math.signum(toUTF8(s1).compareTo(toUTF8(s2))) !== Math.signum(s1.compareTo(s2)))
assert(Math.signum(toUTF8(s1).compareTo(toUTF8(s2))) === Math.signum(s1.compareTo(s2)))
}
}

Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/sql/tests/test_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def test_no_partition_frame(self):
pdf = df.toPandas()
self.assertEqual(len(pdf.columns), 1)
self.assertEqual(pdf.columns[0], "field1")
self.assertTrue("A")
self.assertTrue(pdf.empty)

def test_propagates_spark_exception(self):
df = self.spark.range(3).toDF("i")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class DataFrameSuite extends QueryTest
}

test("access complex data") {
assert(complexData.filter(complexData("a").getItem(0) === 2).count() == 2)
assert(complexData.filter(complexData("m").getItem("1") === 1).count() == 2)
assert(complexData.filter(complexData("a").getItem(0) === 2).count() == 1)
assert(complexData.filter(complexData("m").getItem("1") === 1).count() == 1)
assert(complexData.filter(complexData("s").getField("key") === 1).count() == 1)
}

Expand All @@ -96,7 +96,7 @@ class DataFrameSuite extends QueryTest

test("empty data frame") {
assert(spark.emptyDataFrame.columns.toSeq === Seq.empty[String])
assert(spark.emptyDataFrame.count() === 1)
assert(spark.emptyDataFrame.count() === 0)
}

test("head, take and tail") {
Expand Down