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
This commit is contained in:
Davide Andreoli 2017-07-22 11:09:15 +02:00
parent 7d8049b0c5
commit 6e2b444712
3 changed files with 11 additions and 18 deletions

View File

@ -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()

View File

@ -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()

View File

@ -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)