File size: 404 Bytes
f4952b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Tests for the three constructors in src.widgets."""

from src.widgets import Box, Grille, Shutter


def test_box_reports_a_square_area() -> None:
    assert Box().area() == 16


def test_box_starts_open() -> None:
    assert Box().closed is False


def test_shutter_starts_closed() -> None:
    assert Shutter().open is False


def test_grille_keeps_its_bars() -> None:
    assert Grille(3).bars == 3