mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-116349: Deprecate platform.java_ver
function (#116471)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
4d952737e6
commit
0b647141d5
5 changed files with 26 additions and 4 deletions
|
@ -318,9 +318,13 @@ class PlatformTest(unittest.TestCase):
|
|||
platform._uname_cache = None
|
||||
|
||||
def test_java_ver(self):
|
||||
res = platform.java_ver()
|
||||
if sys.platform == 'java': # Is never actually checked in CI
|
||||
self.assertTrue(all(res))
|
||||
import re
|
||||
msg = re.escape(
|
||||
"'java_ver' is deprecated and slated for removal in Python 3.15"
|
||||
)
|
||||
with self.assertWarnsRegex(DeprecationWarning, msg):
|
||||
res = platform.java_ver()
|
||||
self.assertEqual(len(res), 4)
|
||||
|
||||
def test_win32_ver(self):
|
||||
res = platform.win32_ver()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue