tests: fix test case to not import distutils on python 3.12

Testing the correctness of the `modules: ` kwarg can be done with other
guaranteed stdlib modules that are even more guaranteed since they
didn't get deprecated for removal.
pull/11133/head
Eli Schwartz 1 year ago
parent 2d6c10908b
commit ecf261330c
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      test cases/python/5 modules kwarg/meson.build

@ -1,7 +1,7 @@
project('python kwarg') project('python kwarg')
py = import('python') py = import('python')
prog_python = py.find_installation('python3', modules : ['distutils']) prog_python = py.find_installation('python3', modules : ['os', 'sys', 're'])
assert(prog_python.found() == true, 'python not found when should be') assert(prog_python.found() == true, 'python not found when should be')
prog_python = py.find_installation('python3', modules : ['thisbetternotexistmod'], required : false) prog_python = py.find_installation('python3', modules : ['thisbetternotexistmod'], required : false)
assert(prog_python.found() == false, 'python not found but reported as found') assert(prog_python.found() == false, 'python not found but reported as found')

Loading…
Cancel
Save