Python tests: migrate tox 37->39 (37 is outdated)

GitOrigin-RevId: 8592221541a2a7512d559184bd352dabef5b657c
This commit is contained in:
Ilya.Kazakevich
2024-07-31 10:33:43 +02:00
committed by intellij-monorepo-bot
parent f71ac66375
commit e75a7f2f83
7 changed files with 10 additions and 10 deletions

View File

@@ -2,4 +2,4 @@
skipsdist=True
envlist = py39, py38
[testenv]
commands=python -c "import sys; assert sys.version_info[:2] == (3,7)"
commands=python -c "import sys; assert sys.version_info[:2] == (3,9)"

View File

@@ -10,4 +10,4 @@ class TheTest(TestCase):
assert 'a' + 'a' == 'A'
def test_ok(self):
import sys; assert sys.version_info[:2] == (3,7)
import sys; assert sys.version_info[:2] == (3,9)

View File

@@ -10,4 +10,4 @@ class TheTest(TestCase):
assert 'a' + 'a' == 'A'
def test_ok(self):
import sys; assert sys.version_info[:2] == (3,7)
import sys; assert sys.version_info[:2] == (3,9)

View File

@@ -6,4 +6,4 @@ def test_bar():
def test_only_37():
import sys
assert str(sys.version).startswith("3.7")
assert str(sys.version).startswith("3.9")

View File

@@ -5,7 +5,7 @@ import unittest
class MyTest(unittest.TestCase):
def test_test(self):
import sys; assert sys.version_info[:2] == (3,7)
import sys; assert sys.version_info[:2] == (3,9)
def test_dtest(self):
pass

View File

@@ -10,4 +10,4 @@ class TheTest(TestCase):
assert 'a' + 'a' == 'A'
def test_ok(self):
import sys; assert sys.version_info[:2] == (3,7)
import sys; assert sys.version_info[:2] == (3,9)

View File

@@ -119,14 +119,14 @@ public final class PyToxTest extends PyEnvTestCase {
}
/**
* Checks empty envs for all but 3.7
* Checks empty envs for all but 3.8
*/
@Test
public void textToxOneInterpreter() {
runPythonTest(new MyPyProcessWithConsoleTestTask("/toxtest/toxOneInterpreter/", 0,
() -> new MyTestProcessRunner(),
Arrays.asList(
Pair.create("py39", new InterpreterExpectations("ython 3.7", true)),
Pair.create("py39", new InterpreterExpectations("ython 3.9", true)),
Pair.create("py38", new InterpreterExpectations("", false))
),
Integer.MAX_VALUE)
@@ -156,7 +156,7 @@ public final class PyToxTest extends PyEnvTestCase {
runPythonTest(new MyPyProcessWithConsoleTestTask("/toxtest/toxSuccess/", 1,
() -> new MyTestProcessRunner(),
Arrays.asList(
Pair.create("py39", new InterpreterExpectations("I am 3.7", true)),
Pair.create("py39", new InterpreterExpectations("I am 3.9", true)),
// Should have output
Pair.create("py38", new InterpreterExpectations("I am 3.8", true))
),
@@ -275,7 +275,7 @@ public final class PyToxTest extends PyEnvTestCase {
final int exitCode) {
Assert.assertThat("Pytest should provide version because of --version", runner.getAllConsoleText(),
Matchers.containsString("pytest"));
Assert.assertEquals("Only 3.7 should be launched", """
Assert.assertEquals("Only 3.9 should be launched", """
Test tree:
[root](+)
.py39(+)