Bug 1280326 - Normalize fake module path; r?ted draft
authorGregory Szorc <gps@mozilla.com>
Fri, 24 Jun 2016 13:49:45 -0700
changeset 381232 9780899f67a1c14f6864f756370c677b84456573
parent 381231 fa8b05b872dc0cf925a0c8cd0b5c2dd864326843
child 523927 2dc822686c2b5eabfa26eab3af06c31e82cfd1eb
push id21439
push userbmo:gps@mozilla.com
push dateFri, 24 Jun 2016 20:50:29 +0000
reviewersted
bugs1280326
milestone50.0a1
Bug 1280326 - Normalize fake module path; r?ted This should make the test failure reported in the bug go away. MozReview-Commit-ID: 83DOBOtAYTM
dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py
--- 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)