~ubuntu-branches/ubuntu/utopic/lazygal/utopic

« back to all changes in this revision

Viewing changes to lazygaltest/test_newsize.py

  • Committer: Package Import Robot
  • Author(s): Michal Čihař, Michal Čihař, Jakub Wilk
  • Date: 2013-06-06 12:05:08 UTC
  • mfrom: (1.2.13)
  • Revision ID: package-import@ubuntu.com-20130606120508-e3g94vl8w9pw7za7
Tags: 0.8-1
[ Michal Čihař ]
* New upstream release.
  - Uses new Genshi templates (Closes: #696682).
  - Correctly handles wronly encoded artist in EXIF (Closes: #696648).
  - Uses GExiv2 (LP: #1074028).
* Depend on GExiv2 instead of pyexiv2.
* Bump standards to 3.9.4.
* Use debhelper 9.

[ Jakub Wilk ]
* Use canonical URIs for Vcs-* fields.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
17
 
18
18
 
19
 
import random, time
 
19
import random
 
20
import time
20
21
import unittest
21
22
from lazygal import newsize
22
23
 
53
54
        orig_size = self.get_random_size()
54
55
        scale = self.get_random_percentage()
55
56
        size_string = '%d%%' % scale
56
 
        real_dest_size = tuple(map(lambda x: x*scale//100, orig_size))
 
57
        real_dest_size = tuple(map(lambda x: x * scale // 100, orig_size))
57
58
 
58
59
        self.check(orig_size, size_string, real_dest_size)
59
60
 
70
71
        size_string = '%d%%%d%%' % (xscale, yscale)
71
72
        x = orig_size[0]
72
73
        y = orig_size[1]
73
 
        real_dest_size = (x*xscale//100, y*yscale//100)
 
74
        real_dest_size = (x * xscale // 100, y * yscale // 100)
74
75
 
75
76
        self.check(orig_size, size_string, real_dest_size, ratiocheck=False)
76
77