Skip to content

Commit

Permalink
Testing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyowl committed Oct 18, 2023
1 parent e35175b commit 0a3ee2b
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 4 deletions.
68 changes: 68 additions & 0 deletions tox-no-conda.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[tox]
requires =
; tox-conda
setuptools >= 30.3.0
pip >= 19.3.1
envlist =
py{38,39,310}-test{,-all}{,-latest,-oldest}{,-cov}
; codestyle

[testenv]

deps = pytest

# Uncomment below (and tox-conda above) if want to use with Anaconda
; conda_env = astLib-tests.yml
; conda_setup_args=
; --override-channels
; conda_install_args=
; --override-channels

# Pass through the following environment variables which may be needed for the CI
; passenv = HOME WINDIR LC_ALL LC_CTYPE CI TRAVIS

# Running the tests from within the tests/ dir avoids importing from source tree
changedir = tests

# tox environments are constructed with so-called 'factors' (or terms)
# separated by hyphens, e.g. test-devdeps-cov. Lines below starting with factor:
# will only take effect if that factor is included in the environment name. To
# see a list of example environments that can be run, along with a description,
# run:
#
# tox -l -v
#
description =
run tests
all: using all optional dependencies
latest: with the latest supported version of key dependencies
oldest: with the oldest supported version of key dependencies
cov: and test coverage

extras =
all: all

commands =
pip freeze
pytest -v
; !cov: pytest -v --pyargs soliket {posargs}
; cov: pytest -v --pyargs soliket --cov soliket --cov-report=xml --cov-config={toxinidir}/setup.cfg {posargs}

; [testenv:codestyle]
; skip_install = true
; conda_env =
; changedir = .
; description = check code style, e.g. with flake8
; deps = flake8
; commands = flake8

; [testenv:docs]
; skip_install = true
; changedir = docs
; description = Make sphinx docs
; deps =
; sphinx
; sphinx_rtd_theme
; commands =
; pip freeze
; sphinx-build -b html . _build
10 changes: 6 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ envlist =

[testenv]

deps = pytest

# Uncomment below (and tox-conda above) if want to use with Anaconda
conda_env = astLib-tests.yml
conda_setup_args=
--override-channels
conda_install_args=
--override-channels

# Pass through the following environment variables which may be needed for the CI
passenv = HOME WINDIR LC_ALL LC_CTYPE CI TRAVIS
; passenv = HOME WINDIR LC_ALL LC_CTYPE CI TRAVIS

# Run the tests in a temporary directory to make sure that we don't import
# this package from the source tree
changedir = .tmp/{envname}
# Running the tests from within the tests/ dir avoids importing from source tree
changedir = tests

# tox environments are constructed with so-called 'factors' (or terms)
# separated by hyphens, e.g. test-devdeps-cov. Lines below starting with factor:
Expand Down

0 comments on commit 0a3ee2b

Please sign in to comment.