Skip to content

Commit 00c92d2

Browse files
committed
[LIVY-1025][TEST] Clean up Python2InterpreterSpec post Python deprecation
## What changes were proposed in this pull request? * Cleans up Python2InterpreterSpec since python 2 is deprecated. * Also removed the Python2SessionSpec counterpart ## How was this patch tested? * CI
1 parent 2528b38 commit 00c92d2

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

repl/src/test/scala/org/apache/livy/repl/PythonInterpreterSpec.scala

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -278,32 +278,7 @@ abstract class PythonBaseInterpreterSpec extends BaseInterpreterSpec {
278278
}
279279
}
280280

281-
class Python2InterpreterSpec extends PythonBaseInterpreterSpec {
282-
283-
implicit val formats = DefaultFormats
284-
285-
override def createInterpreter(): Interpreter = {
286-
val sparkConf = new SparkConf()
287-
PythonInterpreter(sparkConf, new SparkEntries(sparkConf))
288-
}
289-
290-
// Scalastyle is treating unicode escape as non ascii characters. Turn off the check.
291-
// scalastyle:off non.ascii.character.disallowed
292-
it should "print unicode correctly" in withInterpreter { intp =>
293-
intp.execute("print(u\"\u263A\")") should equal(Interpreter.ExecuteSuccess(
294-
TEXT_PLAIN -> "\u263A"
295-
))
296-
intp.execute("""print(u"\u263A")""") should equal(Interpreter.ExecuteSuccess(
297-
TEXT_PLAIN -> "\u263A"
298-
))
299-
intp.execute("""print("\xE2\x98\xBA")""") should equal(Interpreter.ExecuteSuccess(
300-
TEXT_PLAIN -> "\u263A"
301-
))
302-
}
303-
// scalastyle:on non.ascii.character.disallowed
304-
}
305-
306-
class Python3InterpreterSpec extends PythonBaseInterpreterSpec with BeforeAndAfterAll {
281+
class PythonInterpreterSpec extends PythonBaseInterpreterSpec with BeforeAndAfterAll {
307282

308283
implicit val formats = DefaultFormats
309284

repl/src/test/scala/org/apache/livy/repl/PythonSessionSpec.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ abstract class PythonSessionSpec extends BaseSessionSpec(PySpark) {
170170
}
171171
}
172172

173-
class Python2SessionSpec extends PythonSessionSpec
174-
175173
class Python3SessionSpec extends PythonSessionSpec with BeforeAndAfterAll {
176174

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

0 commit comments

Comments
 (0)