summaryrefslogtreecommitdiffstats
path: root/dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py
diff options
context:
space:
mode:
Diffstat (limited to 'dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py')
-rw-r--r--dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py5
1 files changed, 2 insertions, 3 deletions
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()