def test_sub_combinations(self): assert (volA - volB) == volume.CVDefinedVolume(op_id, -0.5, 0.25) assert (volB - volC) == volB assert (volA - volD) == volume.EmptyVolume() assert (volB - volA) == volume.CVDefinedVolume(op_id, 0.5, 0.75) assert ((volD - volA) == volume.UnionVolume( volume.CVDefinedVolume(op_id, -0.75, -0.5), volume.CVDefinedVolume(op_id, 0.5, 0.75))) assert (volA2 - volA) == volume.RelativeComplementVolume(volA2, volA)
def test_sub_combinations(self): assert_equal((volA - volB), volume.CVRangeVolume(op_id, -0.5, 0.25)) assert_equal((volB - volC), volB) assert_equal((volA - volD), volume.EmptyVolume()) assert_equal((volB - volA), volume.CVRangeVolume(op_id, 0.5, 0.75)) assert_equal( (volD - volA), volume.UnionVolume(volume.CVRangeVolume(op_id, -0.75, -0.5), volume.CVRangeVolume(op_id, 0.5, 0.75))) assert_equal((volA2 - volA), volume.RelativeComplementVolume(volA2, volA))