mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 818777 - Switch to NamedTemporaryFile from mozfile; r=ted
This version works with Windows.
This commit is contained in:
parent
9e203b6270
commit
8821ce28f8
@ -6,7 +6,7 @@ from __future__ import unicode_literals
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
from tempfile import NamedTemporaryFile
|
||||
from mozfile.mozfile import NamedTemporaryFile
|
||||
|
||||
from mach.config import (
|
||||
AbsolutePathType,
|
||||
|
@ -5,7 +5,7 @@
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from tempfile import NamedTemporaryFile
|
||||
from mozfile.mozfile import NamedTemporaryFile
|
||||
|
||||
from mozbuild.compilation.warnings import CompilerWarning
|
||||
from mozbuild.compilation.warnings import WarningsCollector
|
||||
@ -221,12 +221,13 @@ class TestWarningsDatabase(unittest.TestCase):
|
||||
self.assertEqual(len(warnings), 1)
|
||||
self.assertEqual(warnings[0]['column'], w['column'])
|
||||
|
||||
# If we delete the source file, calling prune should call the warnings
|
||||
# If we delete the source file, calling prune should cause the warnings
|
||||
# to go away.
|
||||
old_filename = source_files[0].name
|
||||
source_files[0].close()
|
||||
del source_files[0]
|
||||
|
||||
self.assertFalse(os.path.exists(old_filename))
|
||||
|
||||
db.prune()
|
||||
self.assertEqual(len(db), 19)
|
||||
|
||||
|
@ -7,7 +7,7 @@ from __future__ import unicode_literals
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from tempfile import NamedTemporaryFile
|
||||
from mozfile.mozfile import NamedTemporaryFile
|
||||
|
||||
from mach.logging import LoggingManager
|
||||
|
||||
|
@ -12,9 +12,10 @@ from shutil import rmtree
|
||||
from tempfile import (
|
||||
gettempdir,
|
||||
mkdtemp,
|
||||
NamedTemporaryFile,
|
||||
)
|
||||
|
||||
from mozfile.mozfile import NamedTemporaryFile
|
||||
|
||||
from mozbuild.mozconfig import (
|
||||
MozconfigFindException,
|
||||
MozconfigLoadException,
|
||||
|
@ -7,7 +7,7 @@ from __future__ import unicode_literals
|
||||
import hashlib
|
||||
import unittest
|
||||
|
||||
from tempfile import NamedTemporaryFile
|
||||
from mozfile.mozfile import NamedTemporaryFile
|
||||
|
||||
from mozbuild.util import hash_file
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user