Move tests out of the package

This will help us get better coverage info, and prevent packaging
test data with the sdist.
This commit is contained in:
Salad Dais
2021-05-01 00:16:01 +00:00
parent d5d5f5a70b
commit 75e9d03d70
29 changed files with 5 additions and 24 deletions

View File

@@ -1 +0,0 @@
exclude-global *tests*

View File

@@ -1,20 +0,0 @@
"""
Copyright 2009, Linden Research, Inc.
See NOTICE.md for previous contributors
Copyright 2021, Salad Dais
All Rights Reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""

View File

@@ -10,7 +10,7 @@ class TestMesh(unittest.TestCase):
@classmethod @classmethod
def setUpClass(cls) -> None: def setUpClass(cls) -> None:
# Use a rigged cube SLM from the upload process as a test file # Use a rigged cube SLM from the upload process as a test file
slm_file = pkg_resources.resource_filename("hippolyzer.lib.base", "tests/test_resources/testslm.slm") slm_file = pkg_resources.resource_filename(__name__, "test_resources/testslm.slm")
with open(slm_file, "rb") as f: with open(slm_file, "rb") as f:
cls.slm_bytes = f.read() cls.slm_bytes = f.read()

0
tests/proxy/__init__.py Normal file
View File

View File

@@ -14,7 +14,8 @@ from hippolyzer.lib.proxy.message import ProxiedMessage
from hippolyzer.lib.proxy.packets import Direction from hippolyzer.lib.proxy.packets import Direction
from hippolyzer.lib.proxy.region import ProxiedRegion from hippolyzer.lib.proxy.region import ProxiedRegion
from hippolyzer.lib.proxy.sessions import Session from hippolyzer.lib.proxy.sessions import Session
from hippolyzer.lib.proxy.tests.integration import BaseIntegrationTest
from . import BaseIntegrationTest
class MockAddon(BaseAddon): class MockAddon(BaseAddon):

View File

@@ -16,7 +16,8 @@ from hippolyzer.lib.proxy.message import ProxiedMessage
from hippolyzer.lib.proxy.packets import ProxiedUDPPacket, Direction from hippolyzer.lib.proxy.packets import ProxiedUDPPacket, Direction
from hippolyzer.lib.proxy.region import ProxiedRegion from hippolyzer.lib.proxy.region import ProxiedRegion
from hippolyzer.lib.proxy.sessions import Session from hippolyzer.lib.proxy.sessions import Session
from hippolyzer.lib.proxy.tests.integration import BaseIntegrationTest
from . import BaseIntegrationTest
class MockAddon(BaseAddon): class MockAddon(BaseAddon):