diff --git a/.travis.yml b/.travis.yml index c9bc90ae..118aa147 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,4 +20,4 @@ before_script: # run CLI tests and local GUI tests script: - pytest --cov=onionshare tests/ - - cd tests_gui && xvfb-run ./run_unit_tests.sh + - xvfb-run pytest tests_gui/ diff --git a/tests_gui/local_onionshare_receive_mode_upload_public_mode_test.py b/tests_gui/local_onionshare_receive_mode_upload_public_mode_test.py index 1b5722c7..27bf9b2c 100644 --- a/tests_gui/local_onionshare_receive_mode_upload_public_mode_test.py +++ b/tests_gui/local_onionshare_receive_mode_upload_public_mode_test.py @@ -13,11 +13,10 @@ class LocalReceiveModePublicModeTest(unittest.TestCase, GuiReceiveTest): } cls.gui = GuiReceiveTest.set_up(test_settings, 'LocalReceiveModePublicModeTest') - @pytest.mark.run(order=1) def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') def test_run_all_receive_mode_tests(self): self.run_all_receive_mode_tests(True, True) diff --git a/tests_gui/local_onionshare_receive_mode_upload_test.py b/tests_gui/local_onionshare_receive_mode_upload_test.py index 14a0377d..f6594105 100644 --- a/tests_gui/local_onionshare_receive_mode_upload_test.py +++ b/tests_gui/local_onionshare_receive_mode_upload_test.py @@ -12,11 +12,10 @@ class LocalReceiveModeTest(unittest.TestCase, GuiReceiveTest): } cls.gui = GuiReceiveTest.set_up(test_settings, 'LocalReceiveModeTest') - @pytest.mark.run(order=1) def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') def test_run_all_receive_mode_tests(self): self.run_all_receive_mode_tests(False, True) diff --git a/tests_gui/local_onionshare_share_mode_download_public_mode_test.py b/tests_gui/local_onionshare_share_mode_download_public_mode_test.py index 6dcb94df..2a3f9584 100644 --- a/tests_gui/local_onionshare_share_mode_download_public_mode_test.py +++ b/tests_gui/local_onionshare_share_mode_download_public_mode_test.py @@ -12,11 +12,10 @@ class LocalShareModePublicModeTest(unittest.TestCase, GuiShareTest): } cls.gui = GuiShareTest.set_up(test_settings, 'LocalShareModePublicModeTest') - @pytest.mark.run(order=1) def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') def test_run_all_share_mode_tests(self): self.run_all_share_mode_tests(True, False) diff --git a/tests_gui/local_onionshare_share_mode_download_stay_open_test.py b/tests_gui/local_onionshare_share_mode_download_stay_open_test.py index 62eafff7..1f734ae7 100644 --- a/tests_gui/local_onionshare_share_mode_download_stay_open_test.py +++ b/tests_gui/local_onionshare_share_mode_download_stay_open_test.py @@ -12,11 +12,10 @@ class LocalShareModeStayOpenTest(unittest.TestCase, GuiShareTest): } cls.gui = GuiShareTest.set_up(test_settings, 'LocalShareModeStayOpenTest') - @pytest.mark.run(order=1) def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') def test_run_all_share_mode_tests(self): self.run_all_share_mode_tests(False, True) diff --git a/tests_gui/local_onionshare_share_mode_download_test.py b/tests_gui/local_onionshare_share_mode_download_test.py index 98270523..274cc311 100644 --- a/tests_gui/local_onionshare_share_mode_download_test.py +++ b/tests_gui/local_onionshare_share_mode_download_test.py @@ -11,11 +11,10 @@ class LocalShareModeTest(unittest.TestCase, GuiShareTest): } cls.gui = GuiShareTest.set_up(test_settings, 'LocalShareModeTest') - @pytest.mark.run(order=1) def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') def test_run_all_share_mode_tests(self): self.run_all_share_mode_tests(False, False) diff --git a/tests_gui/local_onionshare_share_mode_slug_persistent_test.py b/tests_gui/local_onionshare_share_mode_slug_persistent_test.py index 9e171ba4..3450ec3f 100644 --- a/tests_gui/local_onionshare_share_mode_slug_persistent_test.py +++ b/tests_gui/local_onionshare_share_mode_slug_persistent_test.py @@ -15,11 +15,10 @@ class LocalShareModePersistentSlugTest(unittest.TestCase, GuiShareTest): } cls.gui = GuiShareTest.set_up(test_settings, 'LocalShareModePersistentSlugTest') - @pytest.mark.run(order=1) def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') def test_run_all_share_mode_tests(self): self.run_all_share_mode_persistent_tests(False, True) diff --git a/tests_gui/local_onionshare_share_mode_timer_test.py b/tests_gui/local_onionshare_share_mode_timer_test.py index b13971b0..f9f36c48 100644 --- a/tests_gui/local_onionshare_share_mode_timer_test.py +++ b/tests_gui/local_onionshare_share_mode_timer_test.py @@ -13,11 +13,10 @@ class LocalShareModeTimerTest(unittest.TestCase, GuiShareTest): } cls.gui = GuiShareTest.set_up(test_settings, 'LocalShareModeTimerTest') - @pytest.mark.run(order=1) def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') def test_run_all_share_mode_timer_tests(self): self.run_all_share_mode_timer_tests(False) diff --git a/tests_gui/onionshare_790_cancel_on_second_share_test.py b/tests_gui/onionshare_790_cancel_on_second_share_test.py index d3a1e797..36725fb0 100644 --- a/tests_gui/onionshare_790_cancel_on_second_share_test.py +++ b/tests_gui/onionshare_790_cancel_on_second_share_test.py @@ -13,34 +13,26 @@ class ShareModeCancelSecondShareTest(unittest.TestCase, TorGuiShareTest): } cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeCancelSecondShareTest') - @pytest.mark.run(order=1) @pytest.mark.tor def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') @pytest.mark.tor def test_run_share_mode_tests(self): self.run_all_share_mode_tests(False, False) - # Stop the share in order to test canceling the next share - #@pytest.mark.run(order=3) - #@pytest.mark.tor - #def test_stop_share(self): - # self.server_is_stopped(self.gui.share_mode, True) - # self.web_service_is_stopped() - - @pytest.mark.run(order=4) + @pytest.mark.run(after='test_run_share_mode_tests') @pytest.mark.tor def test_cancel_the_share(self): self.cancel_the_share(self.gui.share_mode) - @pytest.mark.run(order=5) + @pytest.mark.run(after='test_cancel_the_share') @pytest.mark.tor def test_server_is_stopped_round2(self): self.server_is_stopped(self.gui.share_mode, False) - @pytest.mark.run(order=6) + @pytest.mark.run(after='test_server_is_stopped_round2') @pytest.mark.tor def test_web_service_is_stopped_round2(self): self.web_service_is_stopped() diff --git a/tests_gui/onionshare_receive_mode_upload_public_mode_test.py b/tests_gui/onionshare_receive_mode_upload_public_mode_test.py index 8561cbce..ee0c5c34 100644 --- a/tests_gui/onionshare_receive_mode_upload_public_mode_test.py +++ b/tests_gui/onionshare_receive_mode_upload_public_mode_test.py @@ -13,12 +13,11 @@ class ReceiveModeTest(unittest.TestCase, TorGuiReceiveTest): } cls.gui = TorGuiReceiveTest.set_up(test_settings, 'ReceiveModeTest') - @pytest.mark.run(order=1) @pytest.mark.tor def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') @pytest.mark.tor def test_run_all_receive_mode_tests(self): self.run_all_receive_mode_tests(True, True) diff --git a/tests_gui/onionshare_receive_mode_upload_test.py b/tests_gui/onionshare_receive_mode_upload_test.py index 6dac4bc8..f1f683cc 100644 --- a/tests_gui/onionshare_receive_mode_upload_test.py +++ b/tests_gui/onionshare_receive_mode_upload_test.py @@ -12,12 +12,11 @@ class ReceiveModeTest(unittest.TestCase, TorGuiReceiveTest): } cls.gui = TorGuiReceiveTest.set_up(test_settings, 'ReceiveModeTest') - @pytest.mark.run(order=1) @pytest.mark.tor def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') @pytest.mark.tor def test_run_all_receive_mode_tests(self): self.run_all_receive_mode_tests(False, True) diff --git a/tests_gui/onionshare_share_mode_cancel_share_test.py b/tests_gui/onionshare_share_mode_cancel_share_test.py index 62dbc8ad..97adf9ce 100644 --- a/tests_gui/onionshare_share_mode_cancel_share_test.py +++ b/tests_gui/onionshare_share_mode_cancel_share_test.py @@ -11,17 +11,16 @@ class ShareModeCancelTest(unittest.TestCase, TorGuiShareTest): } cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeCancelTest') - @pytest.mark.run(order=1) @pytest.mark.tor def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') @pytest.mark.tor def test_run_share_mode_setup_tests(self): self.run_all_share_mode_setup_tests() - @pytest.mark.run(order=3) + @pytest.mark.run(after='test_run_share_mode_setup_tests') @pytest.mark.tor def test_cancel_the_share(self): self.cancel_the_share(self.gui.share_mode) diff --git a/tests_gui/onionshare_share_mode_download_public_mode_test.py b/tests_gui/onionshare_share_mode_download_public_mode_test.py index 3a17b47e..a4a3bfb1 100644 --- a/tests_gui/onionshare_share_mode_download_public_mode_test.py +++ b/tests_gui/onionshare_share_mode_download_public_mode_test.py @@ -12,12 +12,11 @@ class ShareModePublicModeTest(unittest.TestCase, TorGuiShareTest): } cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModePublicModeTest') - @pytest.mark.run(order=1) @pytest.mark.tor def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') @pytest.mark.tor def test_run_all_share_mode_tests(self): self.run_all_share_mode_tests(True, False) diff --git a/tests_gui/onionshare_share_mode_download_stay_open_test.py b/tests_gui/onionshare_share_mode_download_stay_open_test.py index ddb513dd..33544217 100644 --- a/tests_gui/onionshare_share_mode_download_stay_open_test.py +++ b/tests_gui/onionshare_share_mode_download_stay_open_test.py @@ -12,12 +12,11 @@ class ShareModeStayOpenTest(unittest.TestCase, TorGuiShareTest): } cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeStayOpenTest') - @pytest.mark.run(order=1) @pytest.mark.tor def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') @pytest.mark.tor def test_run_all_share_mode_tests(self): self.run_all_share_mode_tests(False, True) diff --git a/tests_gui/onionshare_share_mode_download_test.py b/tests_gui/onionshare_share_mode_download_test.py index 17c94215..8d6d9655 100644 --- a/tests_gui/onionshare_share_mode_download_test.py +++ b/tests_gui/onionshare_share_mode_download_test.py @@ -11,12 +11,11 @@ class ShareModeTest(unittest.TestCase, TorGuiShareTest): } cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeTest') - @pytest.mark.run(order=1) @pytest.mark.tor def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') @pytest.mark.tor def test_run_all_share_mode_tests(self): self.run_all_share_mode_tests(False, False) diff --git a/tests_gui/onionshare_share_mode_persistent_test.py b/tests_gui/onionshare_share_mode_persistent_test.py index 415ce42e..665aecd5 100644 --- a/tests_gui/onionshare_share_mode_persistent_test.py +++ b/tests_gui/onionshare_share_mode_persistent_test.py @@ -16,12 +16,11 @@ class LocalShareModePersistentSlugTest(unittest.TestCase, TorGuiShareTest): } cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModePersistentSlugTest') - @pytest.mark.run(order=1) @pytest.mark.tor def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') @pytest.mark.tor def test_run_all_share_mode_tests(self): self.run_all_share_mode_persistent_tests(False, True) diff --git a/tests_gui/onionshare_share_mode_stealth_test.py b/tests_gui/onionshare_share_mode_stealth_test.py index 9e4ffa1f..a6bbe08e 100644 --- a/tests_gui/onionshare_share_mode_stealth_test.py +++ b/tests_gui/onionshare_share_mode_stealth_test.py @@ -13,23 +13,22 @@ class ShareModeStealthTest(unittest.TestCase, TorGuiShareTest): } cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeStealthTest') - @pytest.mark.run(order=1) @pytest.mark.tor def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') @pytest.mark.tor def test_run_share_mode_setup_tests(self): self.run_all_share_mode_setup_tests() self.run_all_share_mode_started_tests(False) - @pytest.mark.run(order=3) + @pytest.mark.run(after='test_run_share_mode_setup_tests') @pytest.mark.tor def test_copy_have_hidserv_auth_button(self): self.copy_have_hidserv_auth_button(self.gui.share_mode) - @pytest.mark.run(order=4) + @pytest.mark.run(after='test_run_share_mode_setup_tests') @pytest.mark.tor def test_hidserv_auth_string(self): self.hidserv_auth_string() diff --git a/tests_gui/onionshare_share_mode_timer_test.py b/tests_gui/onionshare_share_mode_timer_test.py index d0b4f4cd..32e28c00 100644 --- a/tests_gui/onionshare_share_mode_timer_test.py +++ b/tests_gui/onionshare_share_mode_timer_test.py @@ -13,12 +13,11 @@ class ShareModeTimerTest(unittest.TestCase, TorGuiShareTest): } cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeTimerTest') - @pytest.mark.run(order=1) @pytest.mark.tor def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') @pytest.mark.tor def test_run_all_share_mode_timer_tests(self): self.run_all_share_mode_timer_tests(False) diff --git a/tests_gui/onionshare_share_mode_tor_connection_killed_test.py b/tests_gui/onionshare_share_mode_tor_connection_killed_test.py index 6ebdec97..9112aedd 100644 --- a/tests_gui/onionshare_share_mode_tor_connection_killed_test.py +++ b/tests_gui/onionshare_share_mode_tor_connection_killed_test.py @@ -11,28 +11,27 @@ class ShareModeTorConnectionKilledTest(unittest.TestCase, TorGuiShareTest): } cls.gui = TorGuiShareTest.set_up(test_settings, 'ShareModeTorConnectionKilledTest') - @pytest.mark.run(order=1) @pytest.mark.tor def test_run_all_common_setup_tests(self): self.run_all_common_setup_tests() - @pytest.mark.run(order=2) + @pytest.mark.run(after='test_run_all_common_setup_tests') @pytest.mark.tor def test_run_share_mode_setup_tests(self): self.run_all_share_mode_setup_tests() self.run_all_share_mode_started_tests(False) - @pytest.mark.run(order=3) + @pytest.mark.run(after='test_run_share_mode_setup_tests') @pytest.mark.tor def test_tor_killed_statusbar_message_shown(self): self.tor_killed_statusbar_message_shown(self.gui.share_mode) - @pytest.mark.run(order=4) + @pytest.mark.run(after='test_tor_killed_statusbar_message_shown') @pytest.mark.tor def test_server_is_stopped(self): self.server_is_stopped(self.gui.share_mode, False) - @pytest.mark.run(order=5) + @pytest.mark.run(after='test_tor_killed_statusbar_message_shown') @pytest.mark.tor def test_web_service_is_stopped(self): self.web_service_is_stopped()