module unit.canvas.data.eras

class unit.canvas.data.eras.ErasTestCase[source]

Bases: timelinelib.test.cases.unit.UnitTestCase

test_default_has_an_empty_list()[source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

class unit.canvas.data.eras.describe_overlapping_eras[source]

Bases: unit.canvas.data.eras.ErasTestCase

All Eras are sorted by start_time. That is…

Era(n).start_time <= Era(n+1).start_time.

Two adjacent Eras are overlapping if..

Era(n+1).start_time < Era(n).end_time

There are 6 different overlapping situations to handle:
  1. o—(e1)—o

    o—(e2)—o

  2. o—(e1)—o o—(e2)——-o

Total ecplise….

  1. o—(e1)——-o o—(e2)—-o

  2. o—(e1)—-o o—(e2)—-o

  3. o——(e1)—-o

    o—(e2)—-o

  4. o——(e1)—-o

    o—(e2)—o

test_eras_are_returned_sorted_when_list_is_unsorted()[source]
test_eras_can_detect_overlapping_type1()[source]
test_eras_can_detect_overlapping_type2()[source]
test_eras_can_detect_overlapping_type3()[source]
test_eras_can_detect_overlapping_type4()[source]
test_eras_can_detect_overlapping_type5()[source]
test_eras_can_detect_overlapping_type6()[source]
test_eras_can_return_a_list_with_added_overlapping_type1_eras()[source]
test_eras_can_return_a_list_with_added_overlapping_type2_eras()[source]
test_eras_can_return_a_list_with_added_overlapping_type3_eras()[source]
test_eras_can_return_a_list_with_added_overlapping_type4_eras()[source]
test_eras_can_return_a_list_with_added_overlapping_type5_eras()[source]
test_eras_can_return_a_list_with_added_overlapping_type6_eras()[source]
test_eras_can_return_a_list_with_3_overlapping_eras()[source]
o——-(e1)——-o

o—–(e2)———-o

o——–(e3)——o

test_eras_with_no_duration_are_excluded()[source]
mix_colors(c0, c1)[source]
mix_3colors(c1, c2, c3)[source]
given_two_overlapping_eras_type_1()[source]
given_two_overlapping_eras_type_2()[source]
given_two_overlapping_eras_type_3()[source]
given_two_overlapping_eras_type_4()[source]
given_two_overlapping_eras_type_5()[source]
given_two_overlapping_eras_type_6()[source]
given_two_eras_with_no_duration()[source]
given_three_overlapping_eras()[source]