Ian Wienand 895fa69e75
python3.12: "fix" unittests
These are written to import the python utility into the unittest as a
module, which is then tested.  Python 3.12 removed "imp" which broke
this.

The documentation discusses using spec_from_file_location [2] for this
task, but one complication is that it only allows files with an
extension of .py to load like that ... so add an additional hack so
that the importlib loader will read the file.

[2] https://docs.python.org/3/library/importlib.html

Change-Id: I3c842b3a712ead6d2151b90171f9228caecedd11
2023-12-18 11:13:39 +11:00
..
2023-12-18 11:13:39 +11:00