Bug 1280326 - Normalize fake module path; r?ted
This should make the test failure reported in the bug go away.
MozReview-Commit-ID: 83DOBOtAYTM
--- a/dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py
+++ b/dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py
@@ -234,17 +234,17 @@ class TestWebIDLCodegenManager(unittest.
# We don't want to mutate files in the source directory because we want
# to be able to build from a read-only filesystem. So, we install a
# dummy module and rewrite the metadata to say it comes from the source
# directory.
#
# Hacking imp to accept a MockedFile doesn't appear possible. So for
# the first iteration we read from a temp file. The second iteration
# doesn't need to import, so we are fine with a mocked file.
- fake_path = mozpath.join(OUR_DIR, 'fakemodule.py')
+ fake_path = os.path.normpath(mozpath.join(OUR_DIR, 'fakemodule.py'))
with NamedTemporaryFile('wt') as fh:
fh.write('# Original content')
fh.flush()
mod = imp.load_source('mozwebidlcodegen.fakemodule', fh.name)
mod.__file__ = fake_path
args = self._get_manager_args()
m1 = WebIDLCodegenManager(**args)