18 lines
471 B
Python
18 lines
471 B
Python
from src.codewars.kata_building_blocks import Block
|
|
|
|
|
|
def test_block():
|
|
b1 = Block([2, 2, 2])
|
|
b2 = Block([41, 87, 67])
|
|
|
|
assert b1.get_width() == 2
|
|
assert b1.get_length() == 2
|
|
assert b1.get_height() == 2
|
|
assert b1.get_volume() == 8
|
|
assert b1.get_surface_area() == 24
|
|
assert b2.get_width() == 41
|
|
assert b2.get_length() == 87
|
|
assert b2.get_height() == 67
|
|
assert b2.get_volume() == 238989
|
|
assert b2.get_surface_area() == 24286
|