mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-12 04:32:37 -03:00
Merge pull request #864 from micahflee/803_deb_package
Fix building debian packages
This commit is contained in:
commit
605a0788af
36 changed files with 81 additions and 14 deletions
|
@ -15,7 +15,7 @@ jobs:
|
||||||
test-3.5: &test-template
|
test-3.5: &test-template
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/python:3.5.6
|
- image: circleci/python:3.5.6
|
||||||
|
|
||||||
working_directory: ~/repo
|
working_directory: ~/repo
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -33,7 +33,7 @@ jobs:
|
||||||
# run tests!
|
# run tests!
|
||||||
- run:
|
- run:
|
||||||
name: run flake tests
|
name: run flake tests
|
||||||
command: |
|
command: |
|
||||||
# stop the build if there are Python syntax errors or undefined names
|
# stop the build if there are Python syntax errors or undefined names
|
||||||
flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
|
flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
|
||||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||||
|
@ -42,7 +42,7 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: run tests
|
name: run tests
|
||||||
command: |
|
command: |
|
||||||
xvfb-run pytest --cov=onionshare --cov=onionshare_gui --cov-report=term-missing -vvv tests/
|
xvfb-run pytest --rungui --cov=onionshare --cov=onionshare_gui --cov-report=term-missing -vvv tests/
|
||||||
|
|
||||||
test-3.6:
|
test-3.6:
|
||||||
<<: *test-template
|
<<: *test-template
|
||||||
|
|
10
BUILD.md
10
BUILD.md
|
@ -155,10 +155,16 @@ Then you can run `pytest` against the `tests/` directory.
|
||||||
pytest tests/
|
pytest tests/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can run GUI tests like this:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pytest --rungui tests/
|
||||||
|
```
|
||||||
|
|
||||||
If you would like to also run the GUI unit tests in 'tor' mode, start Tor Browser in the background, then run:
|
If you would like to also run the GUI unit tests in 'tor' mode, start Tor Browser in the background, then run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pytest --runtor tests/
|
pytest --rungui --runtor tests/
|
||||||
```
|
```
|
||||||
|
|
||||||
Keep in mind that the Tor tests take a lot longer to run than local mode, but they are also more comprehensive.
|
Keep in mind that the Tor tests take a lot longer to run than local mode, but they are also more comprehensive.
|
||||||
|
@ -166,5 +172,5 @@ Keep in mind that the Tor tests take a lot longer to run than local mode, but th
|
||||||
You can also choose to wrap the tests in `xvfb-run` so that a ton of OnionShare windows don't pop up on your desktop (you may need to install the `xorg-x11-server-Xvfb` package), like this:
|
You can also choose to wrap the tests in `xvfb-run` so that a ton of OnionShare windows don't pop up on your desktop (you may need to install the `xorg-x11-server-Xvfb` package), like this:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
xvfb-run pytest tests/
|
xvfb-run pytest --rungui tests/
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
Package3: onionshare
|
Package3: onionshare
|
||||||
Depends3: python3-flask, python3-stem, python3-pyqt5, python3-crypto, python3-socks, python3-distutils, python-nautilus, tor, obfs4proxy
|
Depends3: python3, python3-flask, python3-stem, python3-pyqt5, python3-crypto, python3-socks, python3-distutils, python-nautilus, tor, obfs4proxy
|
||||||
Build-Depends: python3-pytest, python3-flask, python3-stem, python3-pyqt5, python3-crypto, python3-socks, python3-distutils, python-nautilus, tor, obfs4proxy
|
Build-Depends: python3, python3-pytest, python3-flask, python3-stem, python3-pyqt5, python3-crypto, python3-socks, python3-distutils, python-nautilus, tor, obfs4proxy
|
||||||
Suite: bionic
|
Suite: bionic
|
||||||
X-Python3-Version: >= 3.5.3
|
X-Python3-Version: >= 3.5.3
|
||||||
|
|
|
@ -11,19 +11,28 @@ import pytest
|
||||||
from onionshare import common, web, settings, strings
|
from onionshare import common, web, settings, strings
|
||||||
|
|
||||||
def pytest_addoption(parser):
|
def pytest_addoption(parser):
|
||||||
|
parser.addoption(
|
||||||
|
"--rungui", action="store_true", default=False, help="run GUI tests"
|
||||||
|
)
|
||||||
parser.addoption(
|
parser.addoption(
|
||||||
"--runtor", action="store_true", default=False, help="run tor tests"
|
"--runtor", action="store_true", default=False, help="run tor tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pytest_collection_modifyitems(config, items):
|
def pytest_collection_modifyitems(config, items):
|
||||||
if config.getoption("--runtor"):
|
if not config.getoption("--runtor"):
|
||||||
# --runtor given in cli: do not skip tor tests
|
# --runtor given in cli: do not skip tor tests
|
||||||
return
|
skip_tor = pytest.mark.skip(reason="need --runtor option to run")
|
||||||
skip_tor = pytest.mark.skip(reason="need --runtor option to run")
|
for item in items:
|
||||||
for item in items:
|
if "tor" in item.keywords:
|
||||||
if "tor" in item.keywords:
|
item.add_marker(skip_tor)
|
||||||
item.add_marker(skip_tor)
|
|
||||||
|
if not config.getoption('--rungui'):
|
||||||
|
# --rungui given in cli: do not skip GUI tests
|
||||||
|
skip_gui = pytest.mark.skip(reason="need --rungui option to run")
|
||||||
|
for item in items:
|
||||||
|
if "gui" in item.keywords:
|
||||||
|
item.add_marker(skip_gui)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiShareTest import GuiShareTest
|
from .GuiShareTest import GuiShareTest
|
||||||
|
@ -16,6 +17,7 @@ class Local404PublicModeRateLimitTest(unittest.TestCase, GuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiShareTest.tear_down()
|
GuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiShareTest import GuiShareTest
|
from .GuiShareTest import GuiShareTest
|
||||||
|
@ -15,6 +16,7 @@ class Local404RateLimitTest(unittest.TestCase, GuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiShareTest.tear_down()
|
GuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
from PyQt5 import QtCore, QtTest
|
from PyQt5 import QtCore, QtTest
|
||||||
|
|
||||||
|
@ -16,6 +17,7 @@ class LocalQuittingDuringSharePromptsWarningTest(unittest.TestCase, GuiShareTest
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiShareTest.tear_down()
|
GuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiReceiveTest import GuiReceiveTest
|
from .GuiReceiveTest import GuiReceiveTest
|
||||||
|
@ -15,6 +16,7 @@ class LocalReceiveModeSenderClosedTest(unittest.TestCase, GuiReceiveTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiReceiveTest.tear_down()
|
GuiReceiveTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiReceiveTest import GuiReceiveTest
|
from .GuiReceiveTest import GuiReceiveTest
|
||||||
|
@ -16,6 +17,7 @@ class LocalReceiveModeTimerTest(unittest.TestCase, GuiReceiveTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiReceiveTest.tear_down()
|
GuiReceiveTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiReceiveTest import GuiReceiveTest
|
from .GuiReceiveTest import GuiReceiveTest
|
||||||
|
@ -15,6 +16,7 @@ class LocalReceiveModeUnwritableTest(unittest.TestCase, GuiReceiveTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiReceiveTest.tear_down()
|
GuiReceiveTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiReceiveTest import GuiReceiveTest
|
from .GuiReceiveTest import GuiReceiveTest
|
||||||
|
@ -16,6 +17,7 @@ class LocalReceivePublicModeUnwritableTest(unittest.TestCase, GuiReceiveTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiReceiveTest.tear_down()
|
GuiReceiveTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiReceiveTest import GuiReceiveTest
|
from .GuiReceiveTest import GuiReceiveTest
|
||||||
|
@ -16,6 +17,7 @@ class LocalReceiveModePublicModeTest(unittest.TestCase, GuiReceiveTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiReceiveTest.tear_down()
|
GuiReceiveTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiReceiveTest import GuiReceiveTest
|
from .GuiReceiveTest import GuiReceiveTest
|
||||||
|
@ -15,6 +16,7 @@ class LocalReceiveModeTest(unittest.TestCase, GuiReceiveTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiReceiveTest.tear_down()
|
GuiReceiveTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from onionshare import strings
|
from onionshare import strings
|
||||||
|
@ -14,6 +15,7 @@ class SettingsGuiTest(unittest.TestCase, SettingsGuiBaseTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
SettingsGuiBaseTest.tear_down()
|
SettingsGuiBaseTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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()
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from onionshare import strings
|
from onionshare import strings
|
||||||
|
@ -14,6 +15,7 @@ class SettingsGuiTest(unittest.TestCase, SettingsGuiBaseTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
SettingsGuiBaseTest.tear_down()
|
SettingsGuiBaseTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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()
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from onionshare import strings
|
from onionshare import strings
|
||||||
|
@ -14,6 +15,7 @@ class SettingsGuiTest(unittest.TestCase, SettingsGuiBaseTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
SettingsGuiBaseTest.tear_down()
|
SettingsGuiBaseTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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()
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiShareTest import GuiShareTest
|
from .GuiShareTest import GuiShareTest
|
||||||
|
@ -15,6 +16,7 @@ class LocalShareModePublicModeTest(unittest.TestCase, GuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiShareTest.tear_down()
|
GuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiShareTest import GuiShareTest
|
from .GuiShareTest import GuiShareTest
|
||||||
|
@ -15,6 +16,7 @@ class LocalShareModeStayOpenTest(unittest.TestCase, GuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiShareTest.tear_down()
|
GuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiShareTest import GuiShareTest
|
from .GuiShareTest import GuiShareTest
|
||||||
|
@ -14,6 +15,7 @@ class LocalShareModeTest(unittest.TestCase, GuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiShareTest.tear_down()
|
GuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiShareTest import GuiShareTest
|
from .GuiShareTest import GuiShareTest
|
||||||
|
@ -14,6 +15,7 @@ class LocalShareModeLargeDownloadTest(unittest.TestCase, GuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiShareTest.tear_down()
|
GuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiShareTest import GuiShareTest
|
from .GuiShareTest import GuiShareTest
|
||||||
|
@ -18,6 +19,7 @@ class LocalShareModePersistentSlugTest(unittest.TestCase, GuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiShareTest.tear_down()
|
GuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiShareTest import GuiShareTest
|
from .GuiShareTest import GuiShareTest
|
||||||
|
@ -16,6 +17,7 @@ class LocalShareModeTimerTest(unittest.TestCase, GuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiShareTest.tear_down()
|
GuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
from PyQt5 import QtCore, QtTest
|
from PyQt5 import QtCore, QtTest
|
||||||
|
|
||||||
|
@ -17,6 +18,7 @@ class LocalShareModeTimerTooShortTest(unittest.TestCase, GuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiShareTest.tear_down()
|
GuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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()
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import pytest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .GuiShareTest import GuiShareTest
|
from .GuiShareTest import GuiShareTest
|
||||||
|
@ -14,6 +15,7 @@ class LocalShareModeUnReadableFileTest(unittest.TestCase, GuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
GuiShareTest.tear_down()
|
GuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
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()
|
||||||
|
|
|
@ -9,7 +9,7 @@ class ShareModeCancelSecondShareTest(unittest.TestCase, TorGuiShareTest):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
test_settings = {
|
test_settings = {
|
||||||
"close_after_first_download": True
|
"close_after_first_download": True
|
||||||
}
|
}
|
||||||
cls.gui = TorGuiShareTest.set_up(test_settings)
|
cls.gui = TorGuiShareTest.set_up(test_settings)
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ class ShareModeCancelSecondShareTest(unittest.TestCase, TorGuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
TorGuiShareTest.tear_down()
|
TorGuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
|
@ -17,6 +17,7 @@ class ReceiveModeTest(unittest.TestCase, TorGuiReceiveTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
TorGuiReceiveTest.tear_down()
|
TorGuiReceiveTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
|
@ -16,6 +16,7 @@ class ReceiveModeTest(unittest.TestCase, TorGuiReceiveTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
TorGuiReceiveTest.tear_down()
|
TorGuiReceiveTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
|
@ -15,6 +15,7 @@ class ShareModeCancelTest(unittest.TestCase, TorGuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
TorGuiShareTest.tear_down()
|
TorGuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
|
@ -16,6 +16,7 @@ class ShareModePublicModeTest(unittest.TestCase, TorGuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
TorGuiShareTest.tear_down()
|
TorGuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
|
@ -16,6 +16,7 @@ class ShareModeStayOpenTest(unittest.TestCase, TorGuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
TorGuiShareTest.tear_down()
|
TorGuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
|
@ -15,6 +15,7 @@ class ShareModeTest(unittest.TestCase, TorGuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
TorGuiShareTest.tear_down()
|
TorGuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
|
@ -20,6 +20,7 @@ class ShareModePersistentSlugTest(unittest.TestCase, TorGuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
TorGuiShareTest.tear_down()
|
TorGuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
|
@ -17,6 +17,7 @@ class ShareModeStealthTest(unittest.TestCase, TorGuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
TorGuiShareTest.tear_down()
|
TorGuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
|
@ -17,6 +17,7 @@ class ShareModeTimerTest(unittest.TestCase, TorGuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
TorGuiShareTest.tear_down()
|
TorGuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
|
@ -11,6 +11,7 @@ class ShareModeTorConnectionKilledTest(unittest.TestCase, TorGuiShareTest):
|
||||||
}
|
}
|
||||||
cls.gui = TorGuiShareTest.set_up(test_settings)
|
cls.gui = TorGuiShareTest.set_up(test_settings)
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
|
@ -16,6 +16,7 @@ class ShareModeV2OnionTest(unittest.TestCase, TorGuiShareTest):
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
TorGuiShareTest.tear_down()
|
TorGuiShareTest.tear_down()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
@pytest.mark.tor
|
@pytest.mark.tor
|
||||||
def test_gui(self):
|
def test_gui(self):
|
||||||
self.run_all_common_setup_tests()
|
self.run_all_common_setup_tests()
|
||||||
|
|
Loading…
Reference in a new issue