| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| [tox] |
| # Run tox --skip-missing-interpreters if you don't want to install all these interpreters. |
| envlist = |
| build # Build the wheel |
| # Fastest checks first |
| lint |
| typechecks |
| py35 |
| py36 |
| py37 |
| py38 |
| pypy3.5 |
| pypy3.6 |
| |
| |
| [coverage:run] |
| source = |
| avro |
| scripts |
| omit = |
| .tox/* |
| |
| [testenv] |
| wheel = true |
| wheel_build_env = build |
| deps = |
| coverage |
| python-snappy |
| zstandard |
| whitelist_externals = |
| cp |
| mkdir |
| commands_pre = |
| mkdir -p avro/test/interop {toxinidir}/../../build/interop/data |
| cp -r {toxinidir}/../../build/interop/data avro/test/interop |
| coverage run -pm avro.test.gen_interop_data avro/interop.avsc avro/test/interop/data/py.avro |
| cp -r avro/test/interop/data {toxinidir}/../../build/interop |
| commands = |
| coverage run -pm unittest discover --buffer --failfast |
| commands_post = |
| coverage combine |
| coverage report |
| |
| [testenv:build] |
| ## |
| # A virtual environment only used to build the wheel |
| deps = |
| whitelist_externals = |
| commands_pre = |
| commands = |
| commands_post = |
| |
| [testenv:lint] |
| deps = |
| isort |
| pycodestyle |
| commands_pre = |
| commands = |
| isort --check-only . |
| pycodestyle |
| commands_post = |
| |
| [testenv:typechecks] |
| deps = |
| coverage |
| mypy |
| extras = |
| mypy |
| commands = |
| mypy |
| |
| [tool:isort] |
| extra_standard_library = setuptools |
| force_to_top = setuptools |
| line_length = 150 |
| |
| [pycodestyle] |
| exclude = .eggs,.tox,build |
| max-line-length = 150 |
| statistics = True |