fe2edf9c9098

tests: remove "import *" to make pyflakes work better
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sat, 19 Jun 2010 13:44:29 -0400
parents f8bca5fc564b
children 2310846513b8
branches/tags (none)
files review/tests/test_check.py review/tests/test_comment.py review/tests/test_delete.py review/tests/test_diffs.py review/tests/test_init.py review/tests/test_signoff.py

Changes

--- 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)
--- 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 ')
--- 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'])
 
--- 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('|')
--- 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()
--- 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.