mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-24 16:40:04 -05:00
Remove obsolete resource path tests
This commit is contained in:
parent
52337cdc13
commit
0d20cf2fec
@ -152,34 +152,6 @@ class TestGetPlatform:
|
|||||||
assert common_obj.platform == "Windows"
|
assert common_obj.platform == "Windows"
|
||||||
|
|
||||||
|
|
||||||
# TODO: double-check these tests
|
|
||||||
class TestGetResourcePath:
|
|
||||||
def test_onionshare_dev_mode(self, common_obj, sys_onionshare_dev_mode):
|
|
||||||
prefix = os.path.join(
|
|
||||||
os.path.dirname(
|
|
||||||
os.path.dirname(
|
|
||||||
os.path.abspath(inspect.getfile(inspect.currentframe()))
|
|
||||||
)
|
|
||||||
),
|
|
||||||
"share",
|
|
||||||
)
|
|
||||||
assert common_obj.get_resource_path(
|
|
||||||
os.path.join(prefix, "test_filename")
|
|
||||||
) == os.path.join(prefix, "test_filename")
|
|
||||||
|
|
||||||
def test_linux(self, common_obj, platform_linux, sys_argv_sys_prefix):
|
|
||||||
prefix = os.path.join(sys.prefix, "share", "onionshare")
|
|
||||||
assert common_obj.get_resource_path(
|
|
||||||
os.path.join(prefix, "test_filename")
|
|
||||||
) == os.path.join(prefix, "test_filename")
|
|
||||||
|
|
||||||
def test_frozen_darwin(self, common_obj, platform_darwin, sys_frozen, sys_meipass):
|
|
||||||
prefix = os.path.join(sys._MEIPASS, "share")
|
|
||||||
assert common_obj.get_resource_path(
|
|
||||||
os.path.join(prefix, "test_filename")
|
|
||||||
) == os.path.join(prefix, "test_filename")
|
|
||||||
|
|
||||||
|
|
||||||
class TestGetTorPaths:
|
class TestGetTorPaths:
|
||||||
@pytest.mark.skipif(sys.platform != "Darwin", reason="requires MacOS")
|
@pytest.mark.skipif(sys.platform != "Darwin", reason="requires MacOS")
|
||||||
def test_get_tor_paths_darwin(
|
def test_get_tor_paths_darwin(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user