From a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Apr 2024 17:12:12 +0200 Subject: Merging upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'dom/bindings') diff --git a/dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py b/dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py index 10129022e6..a2202f7b24 100644 --- a/dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py +++ b/dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py @@ -2,7 +2,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -import imp import io import json import os @@ -12,7 +11,7 @@ import tempfile import unittest import mozpack.path as mozpath -from mozfile import NamedTemporaryFile +from mozfile import NamedTemporaryFile, load_source from mozunit import MockedOpen, main from mozwebidlcodegen import WebIDLCodegenManager, WebIDLCodegenManagerState @@ -242,7 +241,7 @@ class TestWebIDLCodegenManager(unittest.TestCase): with NamedTemporaryFile("wt") as fh: fh.write("# Original content") fh.flush() - mod = imp.load_source("mozwebidlcodegen.fakemodule", fh.name) + mod = load_source("mozwebidlcodegen.fakemodule", fh.name) mod.__file__ = fake_path args = self._get_manager_args() -- cgit v1.2.3