tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_skip_setup.py (926B)


      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 
      5 from marionette_harness import MarionetteTestCase, SkipTest
      6 
      7 
      8 class TestSetUpSkipped(MarionetteTestCase):
      9    testVar = {"test": "SkipTest"}
     10 
     11    def setUp(self):
     12        MarionetteTestCase.setUp(self)
     13        try:
     14            self.testVar["email"]
     15        except KeyError:
     16            raise SkipTest("email key not present in dict, skip ...")
     17 
     18    def test_assert(self):
     19        assert True
     20 
     21 
     22 class TestSetUpNotSkipped(MarionetteTestCase):
     23    testVar = {"test": "SkipTest"}
     24 
     25    def setUp(self):
     26        try:
     27            self.testVar["test"]
     28        except KeyError:
     29            raise SkipTest("email key not present in dict, skip ...")
     30        MarionetteTestCase.setUp(self)
     31 
     32    def test_assert(self):
     33        assert True