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

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

chipx86
Review Board
master
reviewboard

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. 'FileAttachment' imported but unused

  3. local variable 'reply' is assigned to but never used

  4. 'User' imported but unused

  5. 'LocalSite' imported but unused

  6. 'review_reply_diff_comment_list_mimetype' imported but unused

  7. 'LocalSite' imported but unused

  8. 'review_reply_file_attachment_comment_list_mimetype' imported but unused

  9. 'User' imported but unused

  10. 'LocalSite' imported but unused

  11. 'review_reply_screenshot_comment_list_mimetype' imported but unused

  12. 'User' imported but unused

  13. 'User' imported but unused

  14. 
      
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. Looks like you duplicated this instead of replacing it.

  3. 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: Closed (submitted)

Loading...