Skip to content

Commit

Permalink
Python tox based compression safety testing
Browse files Browse the repository at this point in the history
Compression keywords safety tests:
==================================

In issue telegraphic#140 it was reported that some loaders crash
when 'compression', 'chunks' and related h5py keyword arguments are
specified. By running pytest a second time and thereby specifying
the custom --enable-compression parameter all tests are rerun with

   kwargs={'compression':'gzip', 'compression_opts':6}

All compression sensitive tests especially all 'test_XX_*.py::*' unit test
functions must include the 'compression_kwargs' parameter in their
signature to receive the actual kwargs list to be passed to all 'create_fcn'
function defined by loader module. In case a test function misses to
pass on the 'compression_kwargs' as keyword arguments ('**kwargs') to
   'hickle.dump',
   'hickle._dump',
or any dump_method listed in 'class_register' table of loader module or
specified directly in a 'LoaderManager.register_class' an AssertionError
exception is thrown indicating the name of the test function, the line
in which the affected function is called any function which it calls.
Tests which either test compression related issues explicitly or do not
call any of the dump_functions may be marked accordingly using the
   'pytest.mark.no_compression'
marker to explicitly exclude test function from compression testing.

Tox virtual env manager support:
================================
Adds support for virtualenv manager tox. Tox simplifies local testing of
compatibility for multiple python versions before pushing to github and
creating pullrequest. Travis and Appveyor integration still has to be
tested and verified.

'# Sie sind gerade beim Rebase von Branch 'final_and_cleanup_4.1.0' auf 'ab9a0ee'.
  • Loading branch information
hernot committed Mar 2, 2021
1 parent 3defa6d commit afc155c
Show file tree
Hide file tree
Showing 20 changed files with 931 additions and 291 deletions.
20 changes: 15 additions & 5 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,42 @@ environment:
- PYTHON: "C:\\Python35"
PYTHON_VERSION: "3.5.x"
PYTHON_ARCH: "32"
TOX_APPVEYOR_X64: 0

- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.x"
PYTHON_ARCH: "64"
TOX_APPVEYOR_X64: 1

- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.x"
PYTHON_ARCH: "32"
TOX_APPVEYOR_X64: 0

- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.x"
PYTHON_ARCH: "64"
TOX_APPVEYOR_X64: 1

- PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "32"
TOX_APPVEYOR_X64: 0

- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"
TOX_APPVEYOR_X64: 1

- PYTHON: "C:\\Python38"
PYTHON_VERSION: "3.8.x"
PYTHON_ARCH: "32"
TOX_APPVEYOR_X64: 0

- PYTHON: "C:\\Python38-x64"
PYTHON_VERSION: "3.8.x"
PYTHON_ARCH: "64"
TOX_APPVEYOR_X64: 1

install:
# Prepend newly installed Python to the PATH of this build (this cannot be
Expand All @@ -40,15 +48,17 @@ install:

# Upgrade pip
- "python -m pip install --user --upgrade pip setuptools wheel"
- "python -m pip install tox-appveyor"

# Install testing requirements
- "pip install -r requirements_test.txt"
#- "pip install -r requirements_test.txt"

build: false

test_script:
- "check-manifest"
- "python setup.py sdist bdist_wheel"
- "twine check dist/*"
- "pip install ."
- "pytest"
- "python -m tox"
#- "python setup.py sdist bdist_wheel"
#- "twine check dist/*"
#- "pip install ."
#- "pytest"
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ install:
- sudo apt-get update -qq
- sudo apt-get install -qq libhdf5-serial-dev
- python -m pip install --upgrade pip setuptools wheel
- pip install -r requirements_test.txt
- pip install tox-travis
#- pip install -r requirements_test.txt

script:
- check-manifest
- python setup.py sdist bdist_wheel
- twine check dist/*
- pip install .
- pytest
- tox

# Run code coverage
after_success: codecov
8 changes: 7 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ exclude .nojekyll
exclude .pylintrc
exclude paper*
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-exclude * *.py[co] *.bk
recursive-exclude * old .old
recursive-exclude * *.tox
exclude hickle/tests/classes
recursive-exclude hickle/tests/classes *
exclude hickle/tests/dev_check
recursive-exclude hickle/tests/dev_check *
Loading

0 comments on commit afc155c

Please sign in to comment.