1# This Source Code Form is subject to the terms of the Mozilla Public 2# License, v. 2.0. If a copy of the MPL was not distributed with this 3# file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 5from __future__ import absolute_import 6 7from marionette_harness import MarionetteTestCase, SkipTest 8 9 10class TestSetUpSkipped(MarionetteTestCase): 11 12 testVar = {"test": "SkipTest"} 13 14 def setUp(self): 15 MarionetteTestCase.setUp(self) 16 try: 17 self.testVar["email"] 18 except KeyError: 19 raise SkipTest("email key not present in dict, skip ...") 20 21 def test_assert(self): 22 assert True 23 24 25class TestSetUpNotSkipped(MarionetteTestCase): 26 27 testVar = {"test": "SkipTest"} 28 29 def setUp(self): 30 try: 31 self.testVar["test"] 32 except KeyError: 33 raise SkipTest("email key not present in dict, skip ...") 34 MarionetteTestCase.setUp(self) 35 36 def test_assert(self): 37 assert True 38