Speed up the tests further, and remove interdependencies between tests.

Review Request #4598 — Created Sept. 20, 2013 and submitted

Information

Review Board
master

Reviewers

Speed up the tests further, and remove interdependencies between tests.

Several of the tests would call other tests to set up data, invoking API
requests to provide the data, which added to the test execution time.
This also made it harder to separate tests out into list/item suites.

The tests are now setting up their data using the new factory methods
instead of calling other test functions.

Unit tests pass. This shaves roughly 4 more seconds off tests.

Description From Last Updated

'FileAttachment' imported but unused

reviewbotreviewbot

local variable 'reply' is assigned to but never used

reviewbotreviewbot

'User' imported but unused

reviewbotreviewbot

'LocalSite' imported but unused

reviewbotreviewbot

'review_reply_diff_comment_list_mimetype' imported but unused

reviewbotreviewbot

'User' imported but unused

reviewbotreviewbot

'LocalSite' imported but unused

reviewbotreviewbot

'review_reply_file_attachment_comment_list_mimetype' imported but unused

reviewbotreviewbot

'User' imported but unused

reviewbotreviewbot

'LocalSite' imported but unused

reviewbotreviewbot

'review_reply_screenshot_comment_list_mimetype' imported but unused

reviewbotreviewbot

'User' imported but unused

reviewbotreviewbot

'User' imported but unused

reviewbotreviewbot

Looks like you duplicated this instead of replacing it.

daviddavid

is probably more appropriate than () now that there's only one item.

daviddavid
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    reviewboard/testing/testcase.py
    reviewboard/webapi/tests/test_review_comment.py
    reviewboard/webapi/tests/test_review_reply_screenshot_comment.py
    reviewboard/webapi/tests/test_review_screenshot_comment.py
    reviewboard/webapi/tests/test_file_attachment_draft.py
    reviewboard/webapi/tests/test_file_diff_comment.py
    reviewboard/webapi/tests/test_review_reply.py
    reviewboard/webapi/tests/test_review.py
    reviewboard/webapi/tests/test_file_attachment_comment.py
    reviewboard/webapi/tests/test_file_attachment.py
    reviewboard/webapi/tests/test_review_reply_file_attachment_comment.py
    reviewboard/webapi/tests/test_watched_review_group.py
    reviewboard/webapi/tests/test_review_reply_diff_comment.py
    reviewboard/webapi/tests/test_watched_review_request.py
    reviewboard/webapi/tests/test_screenshot_draft.py
    Ignored Files:

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    reviewboard/testing/testcase.py
    reviewboard/webapi/tests/test_review_comment.py
    reviewboard/webapi/tests/test_review_reply_screenshot_comment.py
    reviewboard/webapi/tests/test_review_screenshot_comment.py
    reviewboard/webapi/tests/test_file_attachment_draft.py
    reviewboard/webapi/tests/test_file_diff_comment.py
    reviewboard/webapi/tests/test_review_reply.py
    reviewboard/webapi/tests/test_review.py
    reviewboard/webapi/tests/test_file_attachment_comment.py
    reviewboard/webapi/tests/test_file_attachment.py
    reviewboard/webapi/tests/test_review_reply_file_attachment_comment.py
    reviewboard/webapi/tests/test_watched_review_group.py
    reviewboard/webapi/tests/test_review_reply_diff_comment.py
    reviewboard/webapi/tests/test_watched_review_request.py
    reviewboard/webapi/tests/test_screenshot_draft.py
    Ignored Files:

  2. Show all issues

    'FileAttachment' imported but unused

  3. Show all issues

    local variable 'reply' is assigned to but never used

  4. Show all issues

    'User' imported but unused

  5. Show all issues

    'LocalSite' imported but unused

  6. Show all issues

    'review_reply_diff_comment_list_mimetype' imported but unused

  7. Show all issues

    'User' imported but unused

  8. Show all issues

    'LocalSite' imported but unused

  9. Show all issues

    'review_reply_file_attachment_comment_list_mimetype' imported but unused

  10. Show all issues

    'User' imported but unused

  11. Show all issues

    'LocalSite' imported but unused

  12. Show all issues

    'review_reply_screenshot_comment_list_mimetype' imported but unused

  13. Show all issues

    'User' imported but unused

  14. Show all issues

    'User' imported but unused

  15. 
      
chipx86
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    reviewboard/testing/testcase.py
    reviewboard/webapi/tests/test_review_comment.py
    reviewboard/webapi/tests/test_review_reply_screenshot_comment.py
    reviewboard/webapi/tests/test_review_screenshot_comment.py
    reviewboard/webapi/tests/test_file_attachment_draft.py
    reviewboard/webapi/tests/test_file_diff_comment.py
    reviewboard/webapi/tests/test_review_reply.py
    reviewboard/webapi/tests/test_review.py
    reviewboard/webapi/tests/test_file_attachment_comment.py
    reviewboard/webapi/tests/test_file_attachment.py
    reviewboard/webapi/tests/test_review_reply_file_attachment_comment.py
    reviewboard/webapi/tests/test_watched_review_group.py
    reviewboard/webapi/tests/test_review_reply_diff_comment.py
    reviewboard/webapi/tests/test_watched_review_request.py
    reviewboard/webapi/tests/test_screenshot_draft.py
    Ignored Files:

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    reviewboard/testing/testcase.py
    reviewboard/webapi/tests/test_review_comment.py
    reviewboard/webapi/tests/test_review_reply_screenshot_comment.py
    reviewboard/webapi/tests/test_review_screenshot_comment.py
    reviewboard/webapi/tests/test_file_attachment_draft.py
    reviewboard/webapi/tests/test_file_diff_comment.py
    reviewboard/webapi/tests/test_review_reply.py
    reviewboard/webapi/tests/test_review.py
    reviewboard/webapi/tests/test_file_attachment_comment.py
    reviewboard/webapi/tests/test_file_attachment.py
    reviewboard/webapi/tests/test_review_reply_file_attachment_comment.py
    reviewboard/webapi/tests/test_watched_review_group.py
    reviewboard/webapi/tests/test_review_reply_diff_comment.py
    reviewboard/webapi/tests/test_watched_review_request.py
    reviewboard/webapi/tests/test_screenshot_draft.py
    Ignored Files:

  2. 
      
david
  1. 
      
  2. Show all issues

    Looks like you duplicated this instead of replacing it.

  3. Show all issues

    is probably more appropriate than () now that there's only one item.

  4. 
      
chipx86
reviewbot
  1. This is a review from Review Bot.
    Tool: PEP8 Style Checker
    Processed Files:
    reviewboard/testing/testcase.py
    reviewboard/webapi/tests/test_review_comment.py
    reviewboard/webapi/tests/test_review_reply_screenshot_comment.py
    reviewboard/webapi/tests/test_review_screenshot_comment.py
    reviewboard/webapi/tests/test_file_attachment_draft.py
    reviewboard/webapi/tests/test_file_diff_comment.py
    reviewboard/webapi/tests/test_review_reply.py
    reviewboard/webapi/tests/test_review.py
    reviewboard/webapi/tests/test_file_attachment_comment.py
    reviewboard/webapi/tests/test_file_attachment.py
    reviewboard/webapi/tests/test_review_reply_file_attachment_comment.py
    reviewboard/webapi/tests/test_watched_review_group.py
    reviewboard/webapi/tests/test_review_reply_diff_comment.py
    reviewboard/webapi/tests/test_watched_review_request.py
    reviewboard/webapi/tests/test_screenshot_draft.py
    Ignored Files:

  2. 
      
reviewbot
  1. This is a review from Review Bot.
    Tool: Pyflakes
    Processed Files:
    reviewboard/testing/testcase.py
    reviewboard/webapi/tests/test_review_comment.py
    reviewboard/webapi/tests/test_review_reply_screenshot_comment.py
    reviewboard/webapi/tests/test_review_screenshot_comment.py
    reviewboard/webapi/tests/test_file_attachment_draft.py
    reviewboard/webapi/tests/test_file_diff_comment.py
    reviewboard/webapi/tests/test_review_reply.py
    reviewboard/webapi/tests/test_review.py
    reviewboard/webapi/tests/test_file_attachment_comment.py
    reviewboard/webapi/tests/test_file_attachment.py
    reviewboard/webapi/tests/test_review_reply_file_attachment_comment.py
    reviewboard/webapi/tests/test_watched_review_group.py
    reviewboard/webapi/tests/test_review_reply_diff_comment.py
    reviewboard/webapi/tests/test_watched_review_request.py
    reviewboard/webapi/tests/test_screenshot_draft.py
    Ignored Files:

  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed