Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Update bricks module tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shorodilov committed Oct 25, 2023
1 parent c93c954 commit 8e6ce2e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/datasets/bricks_test.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import datasets
from datasets import bricks


def test_brick_counter(bricks_wall, bricks_count):
assert datasets.get_bricks_count(bricks_wall) == bricks_count
assert bricks.get_bricks_count(bricks_wall) == bricks_count


def test_matrix_builder(bricks_wall, position):
assert datasets.get_least_bricks_position(bricks_wall) == position
assert bricks.get_least_bricks_position(bricks_wall) == position


def test_least_bricks(bricks_wall, small_bricks_wall):
assert datasets.get_least_bricks_count(bricks_wall) == 1
assert datasets.get_least_bricks_count(small_bricks_wall) == 3
assert bricks.get_least_bricks_count([[1]]) == 0
assert bricks.get_least_bricks_count([[1], [1]]) == 0
assert bricks.get_least_bricks_count(bricks_wall) == 1
assert bricks.get_least_bricks_count(small_bricks_wall) == 3


def test_original_case():
Expand All @@ -21,4 +23,4 @@ def test_original_case():
[2, 4],
[3, 1, 2],
[1, 3, 1, 1]]
assert datasets.get_least_bricks_count(wall) == 2
assert bricks.get_least_bricks_count(wall) == 2

0 comments on commit 8e6ce2e

Please sign in to comment.