Skip to content

Commit

Permalink
init pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX committed Feb 23, 2022
1 parent ec6b460 commit d853cb6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# TODO (MarshalX) make it more pretty
PATH_TO_WRTC_SO = ../../build/lib.macosx-12.1-arm64-3.10/wrtc.cpython-310-darwin.so
PATH_TO_PY_MODULES = ./python-webrtc/python

RUN_TESTS = pytest
RUN_TESTS_OPTS ?= -W ignore:::wrtc -W ignore:::pkg_resources
TESTS_DIR = tests

export PATH_TO_LIB=${PATH_TO_WRTC_SO}
export PYTHONPATH=${PATH_TO_PY_MODULES}

test:
@${RUN_TESTS} ${TESTS_DIR} ${RUN_TESTS_OPTS} $(O)
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
asyncio_mode = strict
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
black
black
pytest-asyncio
6 changes: 6 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# Copyright 2022 Il`ya (Marshal) <https://github.com/MarshalX>. All rights reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE.md file in the root of the project.
#

0 comments on commit d853cb6

Please sign in to comment.