Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporarily move all tests/ into sample-tests/ #87

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
name: Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
python-version: "3.11"
- run: sudo apt install libolm-dev
- run: python -m pip install .[dev]
- run: tox -e check_types
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3-bullseye
FROM python:3.11.6-bullseye
WORKDIR /app
COPY . /app
RUN apt update && apt install -y libolm-dev && rm -rf /var/lib/apt/lists/*
Expand Down
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[mypy]
strict = true
strict_optional = false
disallow_untyped_decorators = false

[mypy-nio.*]
ignore_missing_imports = True
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ packages =
python_requires = >= 3.11
install_requires =
attrs
aiohttp
aiohttp == 3.8.5
quart
matrix-nio[e2e]
matrix-nio[e2e] >= 0.22
tcms-api
Pillow
assertpy
Expand All @@ -29,7 +29,7 @@ trafficlight = py.typed
[options.extras_require]
dev =
# for tests
tox
tox >=3
# for type checking
mypy == 0.940
# for linting
Expand Down
10 changes: 5 additions & 5 deletions trafficlight/http/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
from typing import List
from typing import List, Union

from quart import Blueprint, abort, render_template, request, send_file
from quart import Blueprint, Response, abort, render_template, request, send_file

from trafficlight.internals.testsuite import TestSuite
from trafficlight.store import (
Expand Down Expand Up @@ -63,7 +63,7 @@ async def as_junit(): # type: ignore


@bp.route("/<string:guid>/files/<string:name>", methods=["GET"])
async def test_file(guid: str, name: str): # type: ignore
async def test_file(guid: str, name: str) -> Response:
test = get_test_case(guid)
logger.info("Getting ${guid} ${name}")
if name in test.files:
Expand All @@ -74,7 +74,7 @@ async def test_file(guid: str, name: str): # type: ignore


@bp.route("/<string:guid>/suitestatus", methods=["GET"])
async def testsuite_status(guid: str): # type: ignore
async def testsuite_status(guid: str) -> str:
refresh = request.args.get("refresh", default=0, type=int)
testsuite = get_testsuite(guid)
if testsuite is not None:
Expand All @@ -86,7 +86,7 @@ async def testsuite_status(guid: str): # type: ignore


@bp.route("/<string:guid>/status", methods=["GET"])
async def testcase_status(guid: str): # type: ignore
async def testcase_status(guid: str) -> Union[str, Response]:
refresh = request.args.get("refresh", default=0, type=int)
logger.info("Finding test %s", guid)
test = get_test_case(guid)
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from trafficlight.client_types import ElementCall
from trafficlight.internals.client import ElementCallClient
from trafficlight.internals.test import Test
from trafficlight.tests.video.handle_invite_base import InviteLinksMixin
from trafficlight.sample_tests.video.handle_invite_base import InviteLinksMixin


class OneRegisteredInviteLinksTest(Test, InviteLinksMixin):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from trafficlight.client_types import ElementCall
from trafficlight.internals.client import ElementCallClient
from trafficlight.internals.test import Test
from trafficlight.tests.video.handle_invite_base import InviteLinksMixin
from trafficlight.sample_tests.video.handle_invite_base import InviteLinksMixin


class TwoRegisteredInviteLinksTest(Test, InviteLinksMixin):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from trafficlight.client_types import ElementCall
from trafficlight.internals.client import ElementCallClient
from trafficlight.internals.test import Test
from trafficlight.tests.video.handle_invite_base import InviteLinksMixin
from trafficlight.sample_tests.video.handle_invite_base import InviteLinksMixin


class TwoGuestsInviteLinksTest(Test, InviteLinksMixin):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ async def run(self, alice: ElementCallClient, bob: ElementCallClient) -> None:
)

with soft_assertions():

# Ensure we don't gain or lose members doing this.
assert_that(alice_data.video_tiles).is_length(2)
assert_that(bob_data.video_tiles).is_length(2)
Expand Down
Loading