Skip to content

Commit

Permalink
Prevented warnings for repeated loading for travis Inspector test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Zen-CODE committed Mar 11, 2018
1 parent 8da2272 commit 94db03e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions kivy/tests/test_module_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def setUp(self):
def tearDown(self):
# add the logging back
import kivy.lang.builder as builder
builder.Builder.unload_file("InspectorTestCase.KV")
builder.trace = self._trace
super(InspectorTestCase, self).tearDown()

Expand All @@ -78,7 +79,8 @@ def test_activate_deactivate_bottom(self, *args):
self.clean_garbage()

# build the widget tree & add Window as the main EL
self.root = self.builder.Builder.load_string(KV)
self.root = self.builder.Builder.load_string(
KV, filename="InspectorTestCase.KV")
self.render(self.root)
self.assertLess(len(self._win.children), 2)

Expand Down Expand Up @@ -116,7 +118,8 @@ def test_activate_deactivate_top(self, *args):
self.clean_garbage()

# build the widget tree & add Window as the main EL
self.root = self.builder.Builder.load_string(KV)
self.root = self.builder.Builder.load_string(
KV, filename="InspectorTestCase.KV")
self.render(self.root)
self.assertLess(len(self._win.children), 2)

Expand Down Expand Up @@ -156,7 +159,8 @@ def test_widget_button(self, *args):
self.clean_garbage()

# build the widget tree & add Window as the main EL
self.root = self.builder.Builder.load_string(KV)
self.root = self.builder.Builder.load_string(
KV, filename="InspectorTestCase.KV")
self.render(self.root)
self.assertLess(len(self._win.children), 2)

Expand Down Expand Up @@ -215,7 +219,8 @@ def test_widget_popup(self, *args):
self.clean_garbage()

# build the widget tree & add Window as the main EL
self.root = self.builder.Builder.load_string(KV)
self.root = self.builder.Builder.load_string(
KV, filename="InspectorTestCase.KV")
self.render(self.root)
self.assertLess(len(self._win.children), 2)

Expand Down Expand Up @@ -297,7 +302,8 @@ def test_widget_multipopup(self, *args):
self.clean_garbage()

# build the widget tree & add Window as the main EL
self.root = self.builder.Builder.load_string(KV)
self.root = self.builder.Builder.load_string(
KV, filename="InspectorTestCase.KV")
self.render(self.root)
self.assertLess(len(self._win.children), 2)

Expand Down

0 comments on commit 94db03e

Please sign in to comment.