def test_build_random_office__has_some_offices_start_col_at_9(self): np.random.seed(1) starts = [ calculate.build_random_office(0).start_col for i in range(1000) ] self.assertEqual(9, max(starts))
def test_build_random_office__builds_empty_office_if_p_is_0(self): got = calculate.build_random_office(0) self.assertEqual(0, got.desks.sum())
def test_build_random_office__builds_full_office_if_p_is_1(self): got = calculate.build_random_office(1) self.assertEqual(100, got.desks.sum())
def test_buid_random_office__has_correct_size(self): got = calculate.build_random_office(1) self.assertEqual((10, 10), got.desks.shape)