Skip to content
Snippets Groups Projects
Commit 4d08aee0 authored by David McKenna's avatar David McKenna
Browse files

Init repo from cookiecutter template

parent 698ec45c
No related branches found
No related tags found
No related merge requests found
Pipeline #72475 failed
Pipeline: lofar-station-calibration

#72476

    # Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
    # SPDX-License-Identifier: Apache-2.0
    """Testing of the Cool Module"""
    from unittest import TestCase
    from lofar-station-calibration.cool_module import greeter
    class TestCoolModule(TestCase):
    """Test Case of the Cool Module"""
    def test_greeter(self):
    """Testing that the greeter does not crash"""
    greeter()
    self.assertEqual(2 + 2, 4)
    tox.ini 0 → 100644
    [tox]
    # Generative environment list to test all supported Python versions
    envlist = py3{7,8,9,10},black,pep8,pylint
    minversion = 3.18.0
    [testenv]
    usedevelop = True
    package = wheel
    wheel_build_env = .pkg
    setenv =
    LANGUAGE=en_US
    LC_ALL=en_US.UTF-8
    PYTHONWARNINGS=default::DeprecationWarning
    deps =
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/tests/requirements.txt
    commands =
    {envpython} --version
    {envpython} -m pytest
    [testenv:coverage]
    commands =
    {envpython} --version
    {envpython} -m pytest --cov-report term --cov-report xml --cov-report html --cov=lofar-station-calibration
    # Use generative name and command prefixes to reuse the same virtualenv
    # for all linting jobs.
    [testenv:{pep8,black,pylint,format}]
    usedevelop = False
    envdir = {toxworkdir}/linting
    commands =
    pep8: {envpython} -m flake8 --version
    pep8: {envpython} -m flake8 lofar-station-calibration tests
    black: {envpython} -m black --version
    black: {envpython} -m black --check --diff lofar-station-calibration tests
    pylint: {envpython} -m pylint --version
    pylint: {envpython} -m pylint lofar-station-calibration tests
    format: {envpython} -m autopep8 -v -aa --in-place --recursive lofar-station-calibration
    format: {envpython} -m autopep8 -v -aa --in-place --recursive tests
    format: {envpython} -m black -v lofar-station-calibration tests
    [testenv:docs]
    allowlist_externals =
    sh
    ; unset LC_ALL / LANGUAGE from testenv, would fail sphinx otherwise
    setenv =
    deps =
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/docs/requirements.txt
    changedir = {toxinidir}
    commands =
    sh docs/cleanup.sh
    sphinx-build -b html docs/source docs/build/html
    [testenv:build]
    usedevelop = False
    commands = {envpython} -m build
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment