# HG changeset patch # User Steve Losh # Date 1276969469 14400 # Node ID fe2edf9c90981421c0f99646b59000929c66b87f # Parent f8bca5fc564b22e2d67b322858161a74d9b2763c tests: remove "import *" to make pyflakes work better diff -r f8bca5fc564b -r fe2edf9c9098 review/tests/test_check.py --- a/review/tests/test_check.py Sat Jun 19 13:32:56 2010 -0400 +++ b/review/tests/test_check.py Sat Jun 19 13:44:29 2010 -0400 @@ -1,5 +1,6 @@ -from nose import * -from util import * +from nose import with_setup +from util import setup_reviewed_sandbox, teardown_sandbox, review, should_fail_with + from .. import messages @with_setup(setup_reviewed_sandbox, teardown_sandbox) diff -r f8bca5fc564b -r fe2edf9c9098 review/tests/test_comment.py --- a/review/tests/test_comment.py Sat Jun 19 13:32:56 2010 -0400 +++ b/review/tests/test_comment.py Sat Jun 19 13:44:29 2010 -0400 @@ -1,8 +1,11 @@ -from nose import * -from util import * +import os + +from nose import with_setup +from util import setup_reviewed_sandbox, teardown_sandbox, review, should_fail_with +from util import get_datastore_repo, get_sandbox_repo, get_ui + from .. import api, messages -import os from mercurial.node import hex # TODO: Figure out how to handle external editors nicely with nose. @@ -14,7 +17,6 @@ output = review() assert messages.REVIEW_LOG_COMMENTS % (0, 0) in output - @with_setup(setup_reviewed_sandbox, teardown_sandbox) def test_comment_formatting(): review(comment=True, message=' \tTest comment one.\t ') diff -r f8bca5fc564b -r fe2edf9c9098 review/tests/test_delete.py --- a/review/tests/test_delete.py Sat Jun 19 13:32:56 2010 -0400 +++ b/review/tests/test_delete.py Sat Jun 19 13:44:29 2010 -0400 @@ -1,8 +1,8 @@ -from nose import * -from util import * +from nose import with_setup +from util import setup_reviewed_sandbox, teardown_sandbox, review, should_fail_with + from .. import messages - a1, a2 = (messages.REVIEW_LOG_COMMENT_AUTHOR % '|').split('|') s1, s2 = (messages.REVIEW_LOG_SIGNOFF_AUTHOR % ('|', 'neutral')).split('|') @@ -14,8 +14,6 @@ @with_setup(setup_reviewed_sandbox, teardown_sandbox) def test_delete_invalid(): - # TODO: rename files. - should_fail_with(messages.DELETE_REQUIRES_IDS, delete=True) should_fail_with(messages.DELETE_UNKNOWN_ID % 'a', delete=True, args=['a']) diff -r f8bca5fc564b -r fe2edf9c9098 review/tests/test_diffs.py --- a/review/tests/test_diffs.py Sat Jun 19 13:32:56 2010 -0400 +++ b/review/tests/test_diffs.py Sat Jun 19 13:44:29 2010 -0400 @@ -1,5 +1,6 @@ -from nose import * -from util import * +from nose import with_setup +from util import setup_reviewed_sandbox, teardown_sandbox, review + from .. import messages a1, a2 = (messages.REVIEW_LOG_COMMENT_AUTHOR % '|').split('|') diff -r f8bca5fc564b -r fe2edf9c9098 review/tests/test_init.py --- a/review/tests/test_init.py Sat Jun 19 13:32:56 2010 -0400 +++ b/review/tests/test_init.py Sat Jun 19 13:44:29 2010 -0400 @@ -1,11 +1,16 @@ from __future__ import with_statement -from nose import * -from util import * + +import os + +from nose import with_setup + +from util import setup_reviewed_sandbox, teardown_sandbox, review, should_fail_with +from util import setup_sandbox, get_datastore_repo, get_sandbox_repo +from util import clone_sandbox_repo, sandbox_clone_path + from .. import messages from .. import api -import os - @with_setup(setup_sandbox, teardown_sandbox) def test_init(): sandbox = get_sandbox_repo() diff -r f8bca5fc564b -r fe2edf9c9098 review/tests/test_signoff.py --- a/review/tests/test_signoff.py Sat Jun 19 13:32:56 2010 -0400 +++ b/review/tests/test_signoff.py Sat Jun 19 13:44:29 2010 -0400 @@ -1,7 +1,10 @@ -from nose import * -from util import * +from nose import with_setup +from util import setup_reviewed_sandbox, teardown_sandbox, review, should_fail_with +from util import get_datastore_repo, get_sandbox_repo, get_ui + +from .. import api, messages + from mercurial.node import hex -from .. import messages # TODO: Figure out how to handle external editors nicely with nose.