--- a/review/tests/test_comment.py Sun Oct 11 21:22:38 2009 -0400
+++ b/review/tests/test_comment.py Sun Oct 11 21:30:02 2009 -0400
@@ -10,16 +10,12 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_no_comments():
- sandbox = get_sandbox_repo()
-
output = review()
assert messages.REVIEW_LOG_COMMENTS % (0, 0) in output
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_blank_comment():
- sandbox = get_sandbox_repo()
-
try:
review(comment=True)
except hgutil.Abort, e:
@@ -31,8 +27,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_add_comments_to_parent_rev():
- sandbox = get_sandbox_repo()
-
review(comment=True, message='Test comment one.')
output = review()
@@ -53,8 +47,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_add_comments_to_specific_rev():
- sandbox = get_sandbox_repo()
-
review(comment=True, message='Test comment one.', rev='0')
output = review(rev='0')
@@ -79,8 +71,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_add_comments_to_file():
- sandbox = get_sandbox_repo()
-
review(comment=True, message='Test comment one.', rev='1', files=['file_one'])
output = review(rev='1', files=['file_one'])
@@ -99,8 +89,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_add_comments_to_multiple_files():
- sandbox = get_sandbox_repo()
-
review(comment=True, message='Test comment.', rev='1',
files=['file_one', 'always_changing'])
@@ -119,8 +107,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_add_comments_to_bad_file():
- sandbox = get_sandbox_repo()
-
try:
review(comment=True, message='Test comment one.', files=['bad'])
except hgutil.Abort, e:
@@ -128,13 +114,10 @@
assert messages.COMMENT_FILE_DOES_NOT_EXIST % ('bad', '2') in error
else:
assert False, 'The correct error message was not printed.'
-
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_add_comments_to_file_line():
- sandbox = get_sandbox_repo()
-
try:
review(comment=True, rev='1', message='Test bad comment.', lines='1')
except hgutil.Abort, e:
@@ -163,8 +146,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_add_comments_to_file_lines():
- sandbox = get_sandbox_repo()
-
review(comment=True, rev='1', message='Test comment one.',
files=['file_one'], lines='1,2')
@@ -185,7 +166,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_add_comments_to_file_in_subdir():
- sandbox = get_sandbox_repo()
filename = os.path.join('test_dir', 'test_file')
review(comment=True, message='Test comment one.', rev='1', files=[filename])
@@ -206,8 +186,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_add_comments_to_file_in_cwd():
- sandbox = get_sandbox_repo()
-
os.chdir('test_dir')
review(comment=True, message='Test comment one.', rev='1', files=['test_file'])
@@ -227,7 +205,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_add_comments_to_file_in_reldir():
- sandbox = get_sandbox_repo()
filename = os.path.join('..', 'file_three')
os.chdir('test_dir')
--- a/review/tests/test_diffs.py Sun Oct 11 21:22:38 2009 -0400
+++ b/review/tests/test_diffs.py Sun Oct 11 21:30:02 2009 -0400
@@ -10,8 +10,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_review_diff_default_context():
- sandbox = get_sandbox_repo()
-
output = review(rev='1', files=['long_file'], unified='5')
assert ' 0:' not in output
@@ -31,8 +29,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_review_diff_full_context():
- sandbox = get_sandbox_repo()
-
output = review(rev='1', files=['long_file'], unified='10000')
assert s1 not in output
@@ -44,8 +40,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_review_diff_small_context():
- sandbox = get_sandbox_repo()
-
output = review(rev='1', files=['long_file'], unified='2')
assert ' 3:' not in output
@@ -66,8 +60,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_review_diff_with_comment():
- sandbox = get_sandbox_repo()
-
review(comment=True, rev='1', message='Test comment one.',
files=['long_file'], lines='6,7')
@@ -88,8 +80,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_review_diff_with_skipped_comment():
- sandbox = get_sandbox_repo()
-
review(comment=True, rev='1', message='Test comment one.',
files=['long_file'], lines='3')
--- a/review/tests/test_init.py Sun Oct 11 21:22:38 2009 -0400
+++ b/review/tests/test_init.py Sun Oct 11 21:30:02 2009 -0400
@@ -46,8 +46,6 @@
@with_setup(setup_sandbox, teardown_sandbox)
def test_init_without_remote_path():
- sandbox = get_sandbox_repo()
-
try:
review(init=True)
except hgutil.Abort, e:
@@ -59,8 +57,6 @@
@with_setup(setup_sandbox, teardown_sandbox)
def test_init_twice():
- sandbox = get_sandbox_repo()
-
review(init=True, remote_path='/sandbox-review')
try:
--- a/review/tests/test_signoff.py Sun Oct 11 21:22:38 2009 -0400
+++ b/review/tests/test_signoff.py Sun Oct 11 21:30:02 2009 -0400
@@ -12,16 +12,12 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_no_signoffs():
- sandbox = get_sandbox_repo()
-
output = review()
assert messages.REVIEW_LOG_SIGNOFFS % (0, 0, 0, 0) in output
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_blank_signoff():
- sandbox = get_sandbox_repo()
-
try:
review(signoff=True)
except hgutil.Abort, e:
@@ -33,8 +29,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_signoff_on_parent_rev():
- sandbox = get_sandbox_repo()
-
review(signoff=True, message='Test signoff one.')
output = review()
@@ -47,8 +41,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_signoff_on_specific_rev():
- sandbox = get_sandbox_repo()
-
review(signoff=True, message='Test signoff one.', rev='0')
output = review(rev='0')
@@ -60,8 +52,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_multiple_signoffs():
- sandbox = get_sandbox_repo()
-
review(signoff=True, message='Test signoff one.')
try:
@@ -80,8 +70,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_signoff_yes():
- sandbox = get_sandbox_repo()
-
review(signoff=True, yes=True, message='Test signoff one.')
output = review()
@@ -94,8 +82,6 @@
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_signoff_no():
- sandbox = get_sandbox_repo()
-
review(signoff=True, no=True, message='Test signoff one.')
output = review()