You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by ko...@apache.org on 2019/12/23 00:52:30 UTC
[avro] branch master updated: AVRO-2662: Report Coverage in Python
Tests (#751)
This is an automated email from the ASF dual-hosted git repository.
kojiromike pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new cd91695 AVRO-2662: Report Coverage in Python Tests (#751)
cd91695 is described below
commit cd91695168f9edaac8c1f0140f4a023258f265d4
Author: Michael A. Smith <mi...@smith-li.com>
AuthorDate: Sun Dec 22 19:52:21 2019 -0500
AVRO-2662: Report Coverage in Python Tests (#751)
* AVRO-2662: Report Coverage in Python Tests
* AVRO-2662: Use Newer Tox
* AVRO-2662: Exclude .tox and include gen_interop
---
lang/py/tox.ini | 15 +++++++++++++--
share/docker/Dockerfile | 3 +--
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/lang/py/tox.ini b/lang/py/tox.ini
index dc3308e..0c9ddcd 100644
--- a/lang/py/tox.ini
+++ b/lang/py/tox.ini
@@ -17,8 +17,16 @@
envlist =
py27
+[coverage:run]
+source =
+ avro
+ scripts
+omit =
+ .tox/*
+
[testenv]
deps =
+ coverage
python-snappy
zstandard
whitelist_externals =
@@ -27,7 +35,10 @@ whitelist_externals =
commands_pre =
mkdir -p avro/test/interop {toxinidir}/../../build/interop/data
cp -r {toxinidir}/../../build/interop/data avro/test/interop
- python -m avro.test.gen_interop_data avro/interop.avsc avro/test/interop/data/py.avro
+ 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 =
- python -m unittest discover
+ coverage run -pm unittest discover --buffer --failfast
+commands_post =
+ coverage combine
+ coverage report
diff --git a/share/docker/Dockerfile b/share/docker/Dockerfile
index 2421882..7c9f334 100644
--- a/share/docker/Dockerfile
+++ b/share/docker/Dockerfile
@@ -64,7 +64,6 @@ RUN apt-get -qqy update \
ruby-dev \
source-highlight \
subversion \
- tox \
valgrind \
&& apt-get -qqy clean \
&& rm -rf /var/lib/apt/lists
@@ -130,7 +129,7 @@ RUN python2 -m pip install --upgrade pip setuptools \
# Install Python3 packages
RUN python3 -m pip install --upgrade pip setuptools \
- && python3 -m pip install zstandard
+ && python3 -m pip install tox zstandard
# Install .NET SDK
RUN curl -sSLO https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb \