]> www.fi.muni.cz Git - evince.git/blob - test/test6.py
Added a test to check printing and a size of the file.
[evince.git] / test / test6.py
1 #!/usr/bin/python
2
3 # Test printing
4
5 import os
6 os.environ['LANG']='C'
7 srcdir = os.environ['srcdir']
8
9 from dogtail.procedural import *
10
11 os.unlink("output.ps")
12
13 run('evince', arguments=' '+srcdir+'/test-page-labels.pdf')
14
15 click('File', roleName='menu')
16 click('Print...', roleName='menu item')
17
18 focus.dialog('Print')
19 click('Print to File', roleName='table cell', raw=True)
20 click('Print', roleName='push button')
21
22 statinfo = os.stat ("output.ps")
23 if statinfo.st_size > 100000:
24     exit(1)
25 os.unlink ("output.ps")
26
27 # Close evince
28 click('File', roleName='menu')
29 click('Close', roleName='menu item')