Skip GUI and tor tests if pytest is older than 2.9, to allow tests to run in old ubuntu

This commit is contained in:
Micah Lee 2019-04-18 20:38:44 -07:00
parent ed1ada9c06
commit 3845c5b3cf
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
35 changed files with 35 additions and 0 deletions

View File

@ -18,6 +18,7 @@ class Local404PublicModeRateLimitTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_tests(True, True) self.run_all_share_mode_tests(True, True)

View File

@ -17,6 +17,7 @@ class Local404RateLimitTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_tests(False, True) self.run_all_share_mode_tests(False, True)

View File

@ -18,6 +18,7 @@ class LocalQuittingDuringSharePromptsWarningTest(unittest.TestCase, GuiShareTest
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_tests(False, True) self.run_all_share_mode_tests(False, True)

View File

@ -18,6 +18,7 @@ class LocalReceiveModeTimerTest(unittest.TestCase, GuiReceiveTest):
GuiReceiveTest.tear_down() GuiReceiveTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_receive_mode_timer_tests(False) self.run_all_receive_mode_timer_tests(False)

View File

@ -17,6 +17,7 @@ class LocalReceiveModeUnwritableTest(unittest.TestCase, GuiReceiveTest):
GuiReceiveTest.tear_down() GuiReceiveTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_receive_mode_unwritable_dir_tests(False, True) self.run_all_receive_mode_unwritable_dir_tests(False, True)

View File

@ -18,6 +18,7 @@ class LocalReceivePublicModeUnwritableTest(unittest.TestCase, GuiReceiveTest):
GuiReceiveTest.tear_down() GuiReceiveTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_receive_mode_unwritable_dir_tests(True, True) self.run_all_receive_mode_unwritable_dir_tests(True, True)

View File

@ -18,6 +18,7 @@ class LocalReceiveModePublicModeTest(unittest.TestCase, GuiReceiveTest):
GuiReceiveTest.tear_down() GuiReceiveTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_receive_mode_tests(True, True) self.run_all_receive_mode_tests(True, True)

View File

@ -17,6 +17,7 @@ class LocalReceiveModeTest(unittest.TestCase, GuiReceiveTest):
GuiReceiveTest.tear_down() GuiReceiveTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_receive_mode_tests(False, True) self.run_all_receive_mode_tests(False, True)

View File

@ -16,6 +16,7 @@ class SettingsGuiTest(unittest.TestCase, SettingsGuiBaseTest):
SettingsGuiBaseTest.tear_down() SettingsGuiBaseTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui_legacy_tor(self): def test_gui_legacy_tor(self):
self.gui.onion = OnionStub(True, False) self.gui.onion = OnionStub(True, False)
self.gui.reload_settings() self.gui.reload_settings()

View File

@ -16,6 +16,7 @@ class SettingsGuiTest(unittest.TestCase, SettingsGuiBaseTest):
SettingsGuiBaseTest.tear_down() SettingsGuiBaseTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui_no_tor(self): def test_gui_no_tor(self):
self.gui.onion = OnionStub(False, False) self.gui.onion = OnionStub(False, False)
self.gui.reload_settings() self.gui.reload_settings()

View File

@ -16,6 +16,7 @@ class SettingsGuiTest(unittest.TestCase, SettingsGuiBaseTest):
SettingsGuiBaseTest.tear_down() SettingsGuiBaseTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui_v3_tor(self): def test_gui_v3_tor(self):
self.gui.onion = OnionStub(True, True) self.gui.onion = OnionStub(True, True)
self.gui.reload_settings() self.gui.reload_settings()

View File

@ -19,6 +19,7 @@ class LocalShareModeAutoStartTimerTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_autostop_autostart_mismatch_tests(False) self.run_all_share_mode_autostop_autostart_mismatch_tests(False)

View File

@ -18,6 +18,7 @@ class LocalShareModeAutoStartTimerTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_autostart_timer_tests(False) self.run_all_share_mode_autostart_timer_tests(False)

View File

@ -19,6 +19,7 @@ class LocalShareModeAutoStartTimerTooShortTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_setup_tests() self.run_all_share_mode_setup_tests()

View File

@ -17,6 +17,7 @@ class LocalShareModeCancelTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_setup_tests() self.run_all_share_mode_setup_tests()

View File

@ -17,6 +17,7 @@ class LocalShareModePublicModeTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_tests(True, False) self.run_all_share_mode_tests(True, False)

View File

@ -17,6 +17,7 @@ class LocalShareModeStayOpenTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_tests(False, True) self.run_all_share_mode_tests(False, True)

View File

@ -16,6 +16,7 @@ class LocalShareModeTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_tests(False, False) self.run_all_share_mode_tests(False, False)

View File

@ -16,6 +16,7 @@ class LocalShareModeLargeDownloadTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_large_file_tests(False, True) self.run_all_large_file_tests(False, True)

View File

@ -20,6 +20,7 @@ class LocalShareModePersistentSlugTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_persistent_tests(False, True) self.run_all_share_mode_persistent_tests(False, True)

View File

@ -18,6 +18,7 @@ class LocalShareModeTimerTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_timer_tests(False) self.run_all_share_mode_timer_tests(False)

View File

@ -19,6 +19,7 @@ class LocalShareModeTimerTooShortTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_setup_tests() self.run_all_share_mode_setup_tests()

View File

@ -16,6 +16,7 @@ class LocalShareModeUnReadableFileTest(unittest.TestCase, GuiShareTest):
GuiShareTest.tear_down() GuiShareTest.tear_down()
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_unreadable_file_tests() self.run_all_share_mode_unreadable_file_tests()

View File

@ -19,6 +19,7 @@ class ShareModeCancelSecondShareTest(unittest.TestCase, TorGuiShareTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_tests(False, False) self.run_all_share_mode_tests(False, False)

View File

@ -19,6 +19,7 @@ class ReceiveModeTest(unittest.TestCase, TorGuiReceiveTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_receive_mode_tests(True, True) self.run_all_receive_mode_tests(True, True)

View File

@ -18,6 +18,7 @@ class ReceiveModeTest(unittest.TestCase, TorGuiReceiveTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_receive_mode_tests(False, True) self.run_all_receive_mode_tests(False, True)

View File

@ -18,6 +18,7 @@ class ShareModeCancelTest(unittest.TestCase, TorGuiShareTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_setup_tests() self.run_all_share_mode_setup_tests()

View File

@ -18,6 +18,7 @@ class ShareModePublicModeTest(unittest.TestCase, TorGuiShareTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_tests(True, False) self.run_all_share_mode_tests(True, False)

View File

@ -18,6 +18,7 @@ class ShareModeStayOpenTest(unittest.TestCase, TorGuiShareTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_tests(False, True) self.run_all_share_mode_tests(False, True)

View File

@ -17,6 +17,7 @@ class ShareModeTest(unittest.TestCase, TorGuiShareTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_tests(False, False) self.run_all_share_mode_tests(False, False)

View File

@ -22,6 +22,7 @@ class ShareModePersistentSlugTest(unittest.TestCase, TorGuiShareTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_persistent_tests(False, True) self.run_all_share_mode_persistent_tests(False, True)

View File

@ -19,6 +19,7 @@ class ShareModeStealthTest(unittest.TestCase, TorGuiShareTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_setup_tests() self.run_all_share_mode_setup_tests()

View File

@ -19,6 +19,7 @@ class ShareModeTimerTest(unittest.TestCase, TorGuiShareTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_timer_tests(False) self.run_all_share_mode_timer_tests(False)

View File

@ -13,6 +13,7 @@ class ShareModeTorConnectionKilledTest(unittest.TestCase, TorGuiShareTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_setup_tests() self.run_all_share_mode_setup_tests()

View File

@ -18,6 +18,7 @@ class ShareModeV2OnionTest(unittest.TestCase, TorGuiShareTest):
@pytest.mark.gui @pytest.mark.gui
@pytest.mark.tor @pytest.mark.tor
@pytest.mark.skipif(pytest.__version__ < '2.9', reason="requires newer pytest")
def test_gui(self): def test_gui(self):
self.run_all_common_setup_tests() self.run_all_common_setup_tests()
self.run_all_share_mode_tests(False, False) self.run_all_share_mode_tests(False, False)