def test_range_intersection(self): a = NNR('a') b = NNR(None) self.assertEqual( a.range_intersection([b]), [] ) self.assertEqual( a.range_intersection([NNR('a')]), [NNR('a')] )
def test_range_difference(self): a = NNR('a') b = NNR(None) self.assertEqual( a.range_difference([NNR('a')]), [] ) self.assertEqual( a.range_difference([b]), [NNR('a')] )
def test_range_relational(self): a = NNR('a') aa = NNR('a') b = NNR(None) self.assertTrue(a.issubset(aa)) self.assertFalse(a.issubset(b)) self.assertEqual(a, a) self.assertEqual(a, aa) self.assertNotEqual(a, b) c = NR(None, None, 0) self.assertFalse(a.issubset(c)) self.assertFalse(c.issubset(b)) self.assertNotEqual(a, c) self.assertNotEqual(c, a)
def test_info_methods(self): a = NNR('a') self.assertTrue(a.isdiscrete()) self.assertTrue(a.isfinite())