Files
016-pretty-table/tests/test_constants.py
T
Tirsvad b0a7414204 Add Pretty Table project: plan, accepted documents and code
Business Case, Stakeholder Analysis, Project Plan and milestone MIL-001
with review records RC-001 to RC-003, then the Python project: PrettyTable
Pokemon table, constants, pytest tests, pyproject.toml, Doxyfile, CI
workflow and README.

Task: MIL-001#1
Task: MIL-001#2
Task: MIL-001#3
Task: MIL-001#4
Task: MIL-001#5
Task: MIL-001#6
Task: MIL-001#7
Task: MIL-001#8
2026-10-07 12:02:59 +08:00

18 lines
524 B
Python

"""Tests for the constants."""
from pretty_table import constants
def test_column_titles_match_the_column_constants() -> None:
assert constants.COLUMN_TITLES == (constants.COLUMN_NAME, constants.COLUMN_TYPE)
def test_pokemon_includes_the_lesson_examples() -> None:
assert ("Pikachu", "Electric") in constants.POKEMON
assert ("Squirtle", "Water") in constants.POKEMON
def test_pokemon_names_are_unique() -> None:
names = [name for name, _ in constants.POKEMON]
assert len(names) == len(set(names))