From b3c50725dce772617e2d8cce20ce41a883fa57c1 Mon Sep 17 00:00:00 2001 From: Wyatt Stanke Date: Fri, 12 Apr 2024 16:18:36 -0400 Subject: [PATCH] Start pytest --- .github/workflows/test.yml | 2 +- poetry.lock | 50 +++++++++++++++++++++++++++++++++++++- pyproject.toml | 9 ++++--- 3 files changed, 55 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ca42e12..0de6d8c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Python uses: actions/setup-python@v4 - name: Install Poetry diff --git a/poetry.lock b/poetry.lock index cf3f19f6..38bf7187 100644 --- a/poetry.lock +++ b/poetry.lock @@ -759,6 +759,17 @@ files = [ {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, ] +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + [[package]] name = "jinja2" version = "3.1.3" @@ -1612,6 +1623,21 @@ files = [ docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] +[[package]] +name = "pluggy" +version = "1.4.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, + {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + [[package]] name = "protobuf" version = "5.26.1" @@ -1806,6 +1832,28 @@ docs = ["myst_parser", "sphinx", "sphinx_rtd_theme"] full = ["Pillow (>=8.0.0)", "PyCryptodome", "cryptography"] image = ["Pillow (>=8.0.0)"] +[[package]] +name = "pytest" +version = "8.1.1" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest-8.1.1-py3-none-any.whl", hash = "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7"}, + {file = "pytest-8.1.1.tar.gz", hash = "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=1.4,<2.0" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} + +[package.extras] +testing = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + [[package]] name = "python-dotenv" version = "1.0.1" @@ -2887,4 +2935,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "ea893fbb299a644e4a8fd21598c578572a5a58c9a89bf4f94bc88921aa11b4ba" +content-hash = "45c00f4a91b9a7da1513e36ae7eaf9a95b22165f4773417049b6c26f839f74a0" diff --git a/pyproject.toml b/pyproject.toml index a61c6f15..fb883704 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,18 +54,19 @@ sentry-sdk = "*" python-dotenv = "*" accelerate = "0.28.0" -[tool.poetry.dev-dependencies] -black = "23.3.0" - [tool.poetry.group.lint.dependencies] +black = "^23.1.0" ruff = ">=0.0.249,<0.3.5" types-toml = "^0.10.8.1" types-pytz = "^2023.3.0.0" -black = "^23.1.0" types-chardet = "^5.0.4.6" mypy-protobuf = "^3.0.0" + +[tool.poetry.group.test.dependencies] +pytest = "^8.1.1" + [tool.ruff] line-length = 70