diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 9c094273..e6002bfa 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -21,7 +21,7 @@ jobs: - name: Install dependencies run: | - poetry install + poetry install -E all cd tests/ poetry run pytest --cov-report xml diff --git a/poetry.lock b/poetry.lock index 4497054e..b7ccbb28 100644 --- a/poetry.lock +++ b/poetry.lock @@ -524,6 +524,27 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "nonebug" +version = "0.2.0" +description = "nonebot2 test framework" +category = "dev" +optional = false +python-versions = "^3.7.3" +develop = false + +[package.dependencies] +nonebot2 = "^2.0.0-alpha.14" +pytest = "^6.2.5" +pytest-asyncio = "^0.16.0" +pytest-order = "^1.0.0" + +[package.source] +type = "git" +url = "https://github.com/nonebot/nonebug.git" +reference = "master" +resolved_reference = "e276dfcfadd242f14158f125fa1ed5915973a30a" + [[package]] name = "packaging" version = "21.3" @@ -684,6 +705,20 @@ toml = "*" [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] +[[package]] +name = "pytest-asyncio" +version = "0.16.0" +description = "Pytest support for asyncio." +category = "dev" +optional = false +python-versions = ">= 3.6" + +[package.dependencies] +pytest = ">=5.4.0" + +[package.extras] +testing = ["coverage", "hypothesis (>=5.7.1)"] + [[package]] name = "pytest-cov" version = "3.0.0" @@ -699,6 +734,17 @@ pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"] +[[package]] +name = "pytest-order" +version = "1.0.0" +description = "pytest plugin to run your tests in a specific order" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +pytest = ">=5.0" + [[package]] name = "python-dotenv" version = "0.19.2" @@ -1134,7 +1180,7 @@ quart = ["Quart"] [metadata] lock-version = "1.1" python-versions = "^3.7.3" -content-hash = "c33107aee8de168aab0deceabc9d684f57b5280575da839692f48960998c5a69" +content-hash = "32ef230c4c02d1eb68754ad0bb938d1d960d7c6362ea2250cc23bbed910fbe34" [metadata.files] aiodns = [ @@ -1771,6 +1817,7 @@ mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] +nonebug = [] packaging = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, @@ -1875,10 +1922,18 @@ pytest = [ {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, ] +pytest-asyncio = [ + {file = "pytest-asyncio-0.16.0.tar.gz", hash = "sha256:7496c5977ce88c34379df64a66459fe395cd05543f0a2f837016e7144391fcfb"}, + {file = "pytest_asyncio-0.16.0-py3-none-any.whl", hash = "sha256:5f2a21273c47b331ae6aa5b36087047b4899e40f03f18397c0e65fa5cca54e9b"}, +] pytest-cov = [ {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"}, {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"}, ] +pytest-order = [ + {file = "pytest-order-1.0.0.tar.gz", hash = "sha256:5997a262b31234eebb461f9a9ef24687bf732029b499845a4398b69edb5ac321"}, + {file = "pytest_order-1.0.0-py3-none-any.whl", hash = "sha256:a4cdf12f4c83c76bdfd6e6088e2e157df7fdf91a9c3e3ca7d8809e8dabce0f4b"}, +] python-dotenv = [ {file = "python-dotenv-0.19.2.tar.gz", hash = "sha256:a5de49a31e953b45ff2d2fd434bbc2670e8db5273606c1e737cc6b93eff3655f"}, {file = "python_dotenv-0.19.2-py2.py3-none-any.whl", hash = "sha256:32b2bdc1873fd3a3c346da1c6db83d0053c3c62f28f1f38516070c4c8971b1d3"}, diff --git a/pyproject.toml b/pyproject.toml index 5ef5a065..4312f2a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,7 @@ sphinx = "^4.1.1" isort = "^5.10.1" black = "^21.11b1" pytest-cov = "^3.0.0" +nonebug = { git = "https://github.com/nonebot/nonebug.git" } sphinx-markdown-builder = { git = "https://github.com/nonebot/sphinx-markdown-builder.git" } [tool.poetry.extras]