[tox]
envlist = py
indexserver =
    test = https://test.pypi.org/simple/
skipsdist = True

[testenv]
pip_pre = true
deps =
    :test:julia

    # These are the packages listed in extras_require in setup.py.
    # Not using `julia[test]` to avoid installing the test
    # dependencies from `test.pypi.org`:
    numpy
    ipython
    pytest >= 4.4
    mock

commands =
    python -c "from julia import install; install()"
    python -m julia.runtests -- \
        --log-file {envlogdir}/pytest.log \
	{posargs}

[pytest]
log_file_level = DEBUG

[tox]
envlist = py
skipsdist = True

[testenv]
deps =
    # These are the packages listed in extras_require in setup.py.
    # Not using `julia[test]` to avoid installing the test
    # dependencies from `test.pypi.org`:
    numpy
    ipython
    pytest >= 4.4
    mock

commands =
    pip install --index-url https://test.pypi.org/simple/ julia==0.4.1.dev

    python -c "from julia import install; install()"
    python -m julia.runtests -- \
        --log-file {envlogdir}/pytest.log \
	{posargs}

[pytest]
log_file_level = DEBUG

Use explicit `pip install` to install PyJulia from test.pypi.org
Use explicit `pip install` to install PyJulia from test.pypi.org

This is better because:

* We can make sure that the version installed in this environment is
  the one just uploaded (and fail if it cannot be found).
  See: https://travis-ci.org/JuliaPy/pyjulia/jobs/523283897#L448

* It doesn't rely on deprecated `indexserver` option.

* Simpler.
