Clean up and modernize some of the diff viewer unit tests.
Review Request #8827 — Created March 19, 2017 and submitted
The diff viewer unit tests are some of the oldest in the codebase, and not all of it has aged well, some of it even being in the wrong locations due to bad merges or code movement over the years, or doing too much in one test. This cleans up the unit tests, moving things around, making docstrings more consistent, and splitting up a handful of test methods and classes. This will form the base of additional tests for some diff work being done.
Unit tests pass.
Pyflakes and pep8 are happy.
- Change Summary:
-
Fixed a function being in the wrong place.
- Commit:
-
24cdab99f0428071874727d893a676a1431eb0d74581a511517aebdea3ef0799d2df15723d06e6c0
- Diff:
-
Revision 2 (+909 -855)
-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/tests/test_myersdiff.py reviewboard/diffviewer/tests/test_diff_opcode_generator.py reviewboard/diffviewer/tests/test_diffutils.py reviewboard/diffviewer/tests/test_forms.py reviewboard/diffviewer/tests/test_interesting_lines.py reviewboard/diffviewer/tests/test_processors.py reviewboard/diffviewer/tests/test_filediff_migration.py reviewboard/diffviewer/tests/test_diff_parser.py reviewboard/diffviewer/tests/test_diff_renderer.py reviewboard/diffviewer/tests/test_diff_chunk_generator.py reviewboard/diffviewer/tests/test_filediff.py reviewboard/diffviewer/tests/test_diffset_manager.py reviewboard/diffviewer/tests/test_highlight_region.py Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/tests/test_myersdiff.py reviewboard/diffviewer/tests/test_diff_opcode_generator.py reviewboard/diffviewer/tests/test_diffutils.py reviewboard/diffviewer/tests/test_forms.py reviewboard/diffviewer/tests/test_interesting_lines.py reviewboard/diffviewer/tests/test_processors.py reviewboard/diffviewer/tests/test_filediff_migration.py reviewboard/diffviewer/tests/test_diff_parser.py reviewboard/diffviewer/tests/test_diff_renderer.py reviewboard/diffviewer/tests/test_diff_chunk_generator.py reviewboard/diffviewer/tests/test_filediff.py reviewboard/diffviewer/tests/test_diffset_manager.py reviewboard/diffviewer/tests/test_highlight_region.py