Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -278,32 +278,7 @@ abstract class PythonBaseInterpreterSpec extends BaseInterpreterSpec {
}
}

class Python2InterpreterSpec extends PythonBaseInterpreterSpec {

implicit val formats = DefaultFormats

override def createInterpreter(): Interpreter = {
val sparkConf = new SparkConf()
PythonInterpreter(sparkConf, new SparkEntries(sparkConf))
}

// Scalastyle is treating unicode escape as non ascii characters. Turn off the check.
// scalastyle:off non.ascii.character.disallowed
it should "print unicode correctly" in withInterpreter { intp =>
intp.execute("print(u\"\u263A\")") should equal(Interpreter.ExecuteSuccess(
TEXT_PLAIN -> "\u263A"
))
intp.execute("""print(u"\u263A")""") should equal(Interpreter.ExecuteSuccess(
TEXT_PLAIN -> "\u263A"
))
intp.execute("""print("\xE2\x98\xBA")""") should equal(Interpreter.ExecuteSuccess(
TEXT_PLAIN -> "\u263A"
))
}
// scalastyle:on non.ascii.character.disallowed
}

class Python3InterpreterSpec extends PythonBaseInterpreterSpec with BeforeAndAfterAll {
class PythonInterpreterSpec extends PythonBaseInterpreterSpec with BeforeAndAfterAll {

implicit val formats = DefaultFormats

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ abstract class PythonSessionSpec extends BaseSessionSpec(PySpark) {
}
}

class Python2SessionSpec extends PythonSessionSpec

class Python3SessionSpec extends PythonSessionSpec with BeforeAndAfterAll {

override protected def withFixture(test: NoArgTest): Outcome = {
Expand Down