from cyinterval.cyinterval import Interval, IntervalSet
from nose.tools import assert_equal

def test_interval_set_construction():
    interval_set = IntervalSet(Interval(0.,1.), Interval(2.,3.))
    assert_equal(interval_set.intervals[0], Interval(0.,1.))
    assert_equal(interval_set.intervals[1], Interval(2.,3.))

if __name__ == '__main__':
    import sys
    import nose
    # This code will run the test in this file.'
    module_name = sys.modules[__name__].__file__

    result = nose.run(argv=[sys.argv[0],
                            module_name,
                            '-s', '-v'])


@@ -48,16 +48,34 @@
 ervalSet
+, FloatIntervalSet
 %0Afrom no
@@ -102,16 +102,27 @@
 rt_equal
+, assert_is
 %0A%0Adef te
@@ -124,16 +124,22 @@
 ef test_
+float_
 interval
@@ -345,16 +345,68 @@
 (2.,3.))
+%0A    assert_is(type(interval_set), FloatIntervalSet)
 %0A%0Aif __n

Test type of IntervalSet factory output