~timo-jyrinki/ubuntu/trusty/pitivi/backport_utopic_fixes

« back to all changes in this revision

Viewing changes to tests/test_common.py

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2014-04-05 15:28:16 UTC
  • mfrom: (6.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20140405152816-6lijoax4cngiz5j5
Tags: 0.93-3
* debian/control:
  + Depend on python-gi (>= 3.10), older versions do not work
    with pitivi (Closes: #732813).
  + Add missing dependency on gir1.2-clutter-gst-2.0 (Closes: #743692).
  + Add suggests on gir1.2-notify-0.7 and gir1.2-gnomedesktop-3.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# PiTiVi , Non-linear video editor
 
1
# Pitivi video editor
2
2
#
3
3
#       tests/test_common.py
4
4
#
20
20
# Boston, MA 02110-1301, USA.
21
21
 
22
22
import common
23
 
from unittest import main
24
 
from pitivi.ui import common as ui_common
 
23
import pitivi.utils.ui as ui_common
25
24
 
26
25
 
27
26
class TestColors(common.TestCase):
28
27
 
29
28
    def test_pack_color_32(self):
30
29
        self.assertEquals(
31
 
                0x01020408,
32
 
                ui_common.pack_color_32(0x01FF, 0x02FF, 0x04FF, 0x08FF))
 
30
            0x01020408,
 
31
            ui_common.pack_color_32(0x01FF, 0x02FF, 0x04FF, 0x08FF))
33
32
 
34
33
    def test_pack_color_64(self):
35
34
        self.assertEquals(
36
 
                0x01FF02FF04FF08FF,
37
 
                ui_common.pack_color_64(0x01FF, 0x02FF, 0x04FF, 0x08FF))
 
35
            0x01FF02FF04FF08FF,
 
36
            ui_common.pack_color_64(0x01FF, 0x02FF, 0x04FF, 0x08FF))
38
37
 
39
38
    def test_unpack_color_32(self):
40
39
        self.assertEquals(
41
 
                (0x0100, 0x0200, 0x0400, 0x0800),
42
 
                ui_common.unpack_color_32(0x01020408))
 
40
            (0x0100, 0x0200, 0x0400, 0x0800),
 
41
            ui_common.unpack_color_32(0x01020408))
43
42
 
44
43
    def test_unpack_color_64(self):
45
44
        self.assertEquals(
46
 
                (0x01FF, 0x02FF, 0x04FF, 0x08FF),
47
 
                ui_common.unpack_color_64(0x01FF02FF04FF08FF))
48
 
 
49
 
if __name__ == "__main__":
50
 
    main()
 
45
            (0x01FF, 0x02FF, 0x04FF, 0x08FF),
 
46
            ui_common.unpack_color_64(0x01FF02FF04FF08FF))