davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=6e2b444712db7b076e5cfa7e7b694f0ff0c2dffb
commit 6e2b444712db7b076e5cfa7e7b694f0ff0c2dffb Author: Dave Andreoli <d...@gurumeditation.it> Date: Sat Jul 22 11:09:15 2017 +0200 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 --- tests/elementary/test_01_basics.py | 8 +++----- tests/elementary/test_02_image_icon.py | 13 +++++-------- tests/elementary/test_03_entry.py | 8 +++----- 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 import logging from efl.eo import Eo -from efl import elementary -from efl.elementary.window import Window, ELM_WIN_BASIC -from efl.elementary.button import Button +from efl import elementary as elm def cb1(*args): @@ -19,13 +17,13 @@ def cb2(*args): class TestElmBasics(unittest.TestCase): def setUp(self): - self.o = Window("t", ELM_WIN_BASIC) + self.o = elm.Window("t", elm.ELM_WIN_BASIC) def tearDown(self): self.o.delete() def testParentGet2(self): - o = Button(self.o) + o = elm.Button(self.o) self.assertEqual(Eo.parent_get(o), self.o) o.delete() 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 from efl.eo import Eo from efl.evas import Image as evasImage -from efl import elementary -from efl.elementary.window import Window, ELM_WIN_BASIC -from efl.elementary.image import Image -from efl.elementary.icon import Icon +from efl import elementary as elm script_path = os.path.dirname(os.path.abspath(__file__)) img_path = os.path.join(script_path, "images") @@ -18,8 +15,8 @@ img_path = os.path.join(script_path, "images") class TestElmImage(unittest.TestCase): def setUp(self): - self.w = Window("t", ELM_WIN_BASIC) - self.o = Image(self.w) + self.w = elm.Window("t", elm.ELM_WIN_BASIC) + self.o = elm.Image(self.w) def tearDown(self): self.o.delete() @@ -76,8 +73,8 @@ class TestElmImage(unittest.TestCase): class TestElmIcon(unittest.TestCase): def setUp(self): - self.w = Window("t", ELM_WIN_BASIC) - self.o = Icon(self.w) + self.w = elm.Window("t", elm.ELM_WIN_BASIC) + self.o = elm.Icon(self.w) def tearDown(self): 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 import logging from efl.eo import Eo -from efl import elementary -from efl.elementary.window import Window, ELM_WIN_BASIC -from efl.elementary.entry import Entry +from efl import elementary as elm class TestElmBasics(unittest.TestCase): def setUp(self): - self.o = Window("t", ELM_WIN_BASIC) + self.o = elm.Window("t", elm.ELM_WIN_BASIC) def tearDown(self): self.o.delete() def testEntryUnicode(self): - o = Entry(self.o) + o = elm.Entry(self.o) t = u"aöäöäa" o.text = t self.assertEqual(o.text, t) --