Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Bug 781473 - Update mutt tests to work with latest processhandler cha…
Browse files Browse the repository at this point in the history
…nges in bug 776931. r=ahal
  • Loading branch information
whimboo committed Aug 10, 2012
1 parent 91d319a commit b4725db
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mozmill/setup.py
Expand Up @@ -42,7 +42,7 @@
""",
platforms=['Any'],
install_requires=['jsbridge == 3.0rc1',
'mozrunner == 5.8',
'mozrunner == 5.9',
'ManifestDestiny == 0.5.5',
'mozinfo == 0.3.3'],
classifiers=[license, topic,
Expand Down
10 changes: 7 additions & 3 deletions mutt/mutt/tests/python/cli/options_tests_and_manifest.py
Expand Up @@ -4,6 +4,7 @@
import os
import unittest

from mozprocess import ProcessHandler

class TestManifestTestsOptions(unittest.TestCase):
"""Ensure that tests and manifests cannot be specified at the same time."""
Expand All @@ -12,14 +13,17 @@ def test_options(self):
absdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
testdir = os.path.join(absdir, 'js-tests')

retval = subprocess.call(['mozmill',
process = ProcessHandler(['mozmill',
'-b', os.environ['BROWSER_PATH'],
'-t', os.path.join(testdir,
'test_module1.js'),
'-m', os.path.join(testdir, 'example.ini')
])
self.assertEqual(retval, 2, 'Parser error due to -t and -m are "'
'mutually exclusive')
process.run()
process.waitForFinish()

self.assertNotEqual(process.proc.poll(), 0,
'Parser error due to -t and -m are mutually exclusive')

if __name__ == '__main__':
unittest.main()
6 changes: 4 additions & 2 deletions mutt/mutt/tests/python/testprofilepath.py
Expand Up @@ -35,8 +35,10 @@ def test_relative_path(self):
'-t', 'test_dummy.js',
'--profile=testprofilepath'],
cwd=tempdir)
code = process.waitForFinish(timeout=120)
self.assertEqual(code, 0)
process.run()
process.waitForFinish()

self.assertNotEqual(process.proc.poll(), None)

# cleanup
shutil.rmtree(tempdir)
Expand Down

0 comments on commit b4725db

Please sign in to comment.