summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2017-07-22 11:09:15 +0200
committerDave Andreoli <dave@gurumeditation.it>2017-07-22 11:09:15 +0200
commit6e2b444712db7b076e5cfa7e7b694f0ff0c2dffb (patch)
tree557f4b405ec9b03dd1f9a69889c554a5b7305d9a
parent7d8049b0c5e06403433cfef362ec8771cf8cef95 (diff)
Use new style import in elm tests
For some obscure reasons the elm tests was failing here (only when run from the setup.py command) with the old style imports
-rw-r--r--tests/elementary/test_01_basics.py8
-rw-r--r--tests/elementary/test_02_image_icon.py13
-rw-r--r--tests/elementary/test_03_entry.py8
3 files changed, 11 insertions, 18 deletions
diff --git a/tests/elementary/test_01_basics.py b/tests/elementary/test_01_basics.py
index 89933cc..ce7fcb7 100644
--- a/tests/elementary/test_01_basics.py
+++ b/tests/elementary/test_01_basics.py
@@ -4,9 +4,7 @@ import unittest
4import logging 4import logging
5 5
6from efl.eo import Eo 6from efl.eo import Eo
7from efl import elementary 7from efl import elementary as elm
8from efl.elementary.window import Window, ELM_WIN_BASIC
9from efl.elementary.button import Button
10 8
11 9
12def cb1(*args): 10def cb1(*args):
@@ -19,13 +17,13 @@ def cb2(*args):
19class TestElmBasics(unittest.TestCase): 17class TestElmBasics(unittest.TestCase):
20 18
21 def setUp(self): 19 def setUp(self):
22 self.o = Window("t", ELM_WIN_BASIC) 20 self.o = elm.Window("t", elm.ELM_WIN_BASIC)
23 21
24 def tearDown(self): 22 def tearDown(self):
25 self.o.delete() 23 self.o.delete()
26 24
27 def testParentGet2(self): 25 def testParentGet2(self):
28 o = Button(self.o) 26 o = elm.Button(self.o)
29 self.assertEqual(Eo.parent_get(o), self.o) 27 self.assertEqual(Eo.parent_get(o), self.o)
30 o.delete() 28 o.delete()
31 29
diff --git a/tests/elementary/test_02_image_icon.py b/tests/elementary/test_02_image_icon.py
index 1f0973a..d898124 100644
--- a/tests/elementary/test_02_image_icon.py
+++ b/tests/elementary/test_02_image_icon.py
@@ -6,10 +6,7 @@ import logging
6 6
7from efl.eo import Eo 7from efl.eo import Eo
8from efl.evas import Image as evasImage 8from efl.evas import Image as evasImage
9from efl import elementary 9from efl import elementary as elm
10from efl.elementary.window import Window, ELM_WIN_BASIC
11from efl.elementary.image import Image
12from efl.elementary.icon import Icon
13 10
14script_path = os.path.dirname(os.path.abspath(__file__)) 11script_path = os.path.dirname(os.path.abspath(__file__))
15img_path = os.path.join(script_path, "images") 12img_path = os.path.join(script_path, "images")
@@ -18,8 +15,8 @@ img_path = os.path.join(script_path, "images")
18class TestElmImage(unittest.TestCase): 15class TestElmImage(unittest.TestCase):
19 16
20 def setUp(self): 17 def setUp(self):
21 self.w = Window("t", ELM_WIN_BASIC) 18 self.w = elm.Window("t", elm.ELM_WIN_BASIC)
22 self.o = Image(self.w) 19 self.o = elm.Image(self.w)
23 20
24 def tearDown(self): 21 def tearDown(self):
25 self.o.delete() 22 self.o.delete()
@@ -76,8 +73,8 @@ class TestElmImage(unittest.TestCase):
76class TestElmIcon(unittest.TestCase): 73class TestElmIcon(unittest.TestCase):
77 74
78 def setUp(self): 75 def setUp(self):
79 self.w = Window("t", ELM_WIN_BASIC) 76 self.w = elm.Window("t", elm.ELM_WIN_BASIC)
80 self.o = Icon(self.w) 77 self.o = elm.Icon(self.w)
81 78
82 def tearDown(self): 79 def tearDown(self):
83 self.o.delete() 80 self.o.delete()
diff --git a/tests/elementary/test_03_entry.py b/tests/elementary/test_03_entry.py
index 2bf870c..3784639 100644
--- a/tests/elementary/test_03_entry.py
+++ b/tests/elementary/test_03_entry.py
@@ -5,21 +5,19 @@ import unittest
5import logging 5import logging
6 6
7from efl.eo import Eo 7from efl.eo import Eo
8from efl import elementary 8from efl import elementary as elm
9from efl.elementary.window import Window, ELM_WIN_BASIC
10from efl.elementary.entry import Entry
11 9
12 10
13class TestElmBasics(unittest.TestCase): 11class TestElmBasics(unittest.TestCase):
14 12
15 def setUp(self): 13 def setUp(self):
16 self.o = Window("t", ELM_WIN_BASIC) 14 self.o = elm.Window("t", elm.ELM_WIN_BASIC)
17 15
18 def tearDown(self): 16 def tearDown(self):
19 self.o.delete() 17 self.o.delete()
20 18
21 def testEntryUnicode(self): 19 def testEntryUnicode(self):
22 o = Entry(self.o) 20 o = elm.Entry(self.o)
23 t = u"aöäöäa" 21 t = u"aöäöäa"
24 o.text = t 22 o.text = t
25 self.assertEqual(o.text, t) 23 self.assertEqual(o.text, t)