3030import static org .sonar .plugins .python .api .PythonVersionUtils .Version .V_311 ;
3131import static org .sonar .plugins .python .api .PythonVersionUtils .Version .V_312 ;
3232import static org .sonar .plugins .python .api .PythonVersionUtils .Version .V_313 ;
33+ import static org .sonar .plugins .python .api .PythonVersionUtils .Version .V_314 ;
3334import static org .sonar .plugins .python .api .PythonVersionUtils .Version .V_39 ;
3435import static org .sonar .plugins .python .api .PythonVersionUtils .Version .V_38 ;
3536
@@ -38,7 +39,7 @@ class PythonVersionUtilsTest {
3839 @ RegisterExtension
3940 public LogTesterJUnit5 logTester = new LogTesterJUnit5 ().setLevel (Level .DEBUG );
4041
41- private static final List <PythonVersionUtils .Version > allVersions = List .of (V_38 , V_39 , V_310 , V_311 , V_312 , V_313 );
42+ private static final List <PythonVersionUtils .Version > allVersions = List .of (V_38 , V_39 , V_310 , V_311 , V_312 , V_313 , V_314 );
4243
4344 @ Test
4445 void supportedVersions () {
@@ -47,19 +48,19 @@ void supportedVersions() {
4748 assertThat (PythonVersionUtils .fromString ("2.7" )).hasSameElementsAs (allVersions );
4849 assertThat (PythonVersionUtils .fromString ("2" )).hasSameElementsAs (allVersions );
4950 assertThat (PythonVersionUtils .fromString ("3" )).hasSameElementsAs (allVersions );
50- assertThat (PythonVersionUtils .fromString ("3.9, 3.10" )).containsExactlyInAnyOrder (V_39 , V_310 );
51+ assertThat (PythonVersionUtils .fromString ("3.9, 3.10, 3.14 " )).containsExactlyInAnyOrder (V_39 , V_310 , V_314 );
5152 assertThat (PythonVersionUtils .fromString ("2.7, 3.9" )).hasSameElementsAs (allVersions );
5253 assertThat (PythonVersionUtils .fromString ("3.10" )).containsExactlyInAnyOrder (V_310 );
5354 }
5455
5556 @ Test
5657 void version_out_of_range () {
57- assertThat (PythonVersionUtils .fromString ("4" )).containsExactlyInAnyOrder (V_313 );
58- assertThat (logTester .logs (Level .WARN )).contains ("No explicit support for version 4. Python version has been set to 3.13 ." );
58+ assertThat (PythonVersionUtils .fromString ("4" )).containsExactlyInAnyOrder (V_314 );
59+ assertThat (logTester .logs (Level .WARN )).contains ("No explicit support for version 4. Python version has been set to 3.14 ." );
5960 assertThat (PythonVersionUtils .fromString ("1" )).hasSameElementsAs (allVersions );
6061 assertThat (logTester .logs (Level .WARN )).contains ("No explicit support for version 1. Support for Python versions prior to 3 is deprecated." );
61- assertThat (PythonVersionUtils .fromString ("3.14 " )).containsExactlyInAnyOrder (V_313 );
62- assertThat (logTester .logs (Level .WARN )).contains ("No explicit support for version 3.14 . Python version has been set to 3.13 ." );
62+ assertThat (PythonVersionUtils .fromString ("3.15 " )).containsExactlyInAnyOrder (V_314 );
63+ assertThat (logTester .logs (Level .WARN )).contains ("No explicit support for version 3.15 . Python version has been set to 3.14 ." );
6364 assertThat (PythonVersionUtils .fromString ("3.12" )).containsExactlyInAnyOrder (V_312 );
6465 }
6566
@@ -83,9 +84,11 @@ void isPythonVersionGreaterOrEqualThan() {
8384 assertFalse (PythonVersionUtils .areSourcePythonVersionsGreaterOrEqualThan (Set .of (), V_39 ));
8485 assertFalse (PythonVersionUtils .areSourcePythonVersionsGreaterOrEqualThan (Set .of (V_311 , V_312 ), V_313 ));
8586 assertFalse (PythonVersionUtils .areSourcePythonVersionsGreaterOrEqualThan (Set .of (V_310 , V_312 ), V_311 ));
87+ assertFalse (PythonVersionUtils .areSourcePythonVersionsGreaterOrEqualThan (Set .of (V_313 , V_312 ), V_314 ));
8688 assertTrue (PythonVersionUtils .areSourcePythonVersionsGreaterOrEqualThan (Set .of (V_39 ), V_39 ));
8789 assertTrue (PythonVersionUtils .areSourcePythonVersionsGreaterOrEqualThan (Set .of (V_39 , V_310 ), V_39 ));
8890 assertTrue (PythonVersionUtils .areSourcePythonVersionsGreaterOrEqualThan (Set .of (V_312 , V_310 ), V_39 ));
91+ assertTrue (PythonVersionUtils .areSourcePythonVersionsGreaterOrEqualThan (Set .of (V_314 ), V_314 ));
8992 }
9093
9194}
0 commit comments