-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
206e1f4
commit 7db82ec
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import unittest | ||
|
||
from pathlib import Path | ||
|
||
from PySide import QtGui | ||
|
||
from gui_test import MainWindowTest | ||
|
||
TESTDATA = Path(__file__).parent.parent / 'test_data' | ||
|
||
|
||
class TestViews(MainWindowTest): | ||
"""Basic tests of the boxes and objects views. Functions test as much of the | ||
view's paint methods as possible by loading a document, selecting the view | ||
under test and showing the main window full screen. | ||
""" | ||
|
||
def test_boxes_view_paint(self): | ||
"Boxes view is painted" | ||
self.window.open_file(TESTDATA / 'test_segment.inselect') | ||
self.window.showFullScreen() | ||
self.run_event_loop() | ||
|
||
def test_objects_view_grid_paint(self): | ||
"Objects grid view is painted" | ||
self.window.open_file(TESTDATA / 'test_segment.inselect') | ||
self.window.show_tab(1) | ||
self.window.show_grid() | ||
self.window.showFullScreen() | ||
self.run_event_loop() | ||
|
||
def test_objects_view_expanded_paint(self): | ||
"Objects expanded view is painted" | ||
self.window.open_file(TESTDATA / 'test_segment.inselect') | ||
self.window.show_tab(1) | ||
self.window.show_expanded() | ||
self.window.showFullScreen() | ||
self.run_event_loop() | ||
|
||
|
||
if __name__=='__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,8 @@ | |
0.4494, | ||
0.1356, | ||
0.08060000000000003 | ||
] | ||
], | ||
"rotation": 90 | ||
}, | ||
{ | ||
"fields": {}, | ||
|