File: test___init__.py

package info (click to toggle)
python-milc 1.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 788 kB
  • sloc: python: 1,868; sh: 55; makefile: 3
file content (27 lines) | stat: -rw-r--r-- 587 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Test the few things inside the `milc/__init__.py` file.
"""
import semver

import milc

EMOJI_LEVELS = ('CRITICAL', 'ERROR', 'FATAL', 'WARN', 'WARNING', 'INFO', 'DEBUG', 'NOTSET')


def test_version():
    """Make sure that version matches semver.
    """
    assert semver.VersionInfo.is_valid(milc.__VERSION__)


def test_emojis():
    """Make sure the emoji list is populated.
    """
    for emoji in milc.EMOJI_LOGLEVELS:
        if emoji not in EMOJI_LEVELS:
            raise KeyError(emoji)


def test_cli():
    """Make sure the cli is available.
    """
    assert milc.cli