File: test_cli.py

package info (click to toggle)
python-hupper 1.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 344 kB
  • sloc: python: 1,668; makefile: 149
file content (14 lines) | stat: -rw-r--r-- 309 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import argparse
import pytest

from hupper.cli import interval_parser


@pytest.mark.parametrize('value', ['0', "-1"])
def test_interval_parser_errors(value):
    with pytest.raises(argparse.ArgumentTypeError):
        interval_parser(value)


def test_interval_parser():
    assert interval_parser("5") == 5