예제 #1
0
    def testFastMinimum(self):
        l1 = Location.fast_min_str('join(1..10,11..50)')
        l2 = Location.fast_min_str('complement(15..20)')
        l3 = Location.fast_min_str('REF2:5..10')
        l4 = Location.fast_min_str('complement(join(1..10,11..50))')
        l5 = Location.fast_min_str('complement(join(15..20,1..2))')

        self.assertEqual(l1, 1, 'Minimum should be 1')
        self.assertEqual(l2, 15, 'Minimum should be 15')
        self.assertEqual(l3, 5, 'Minimum should be 5')
        self.assertEqual(l4, 1, 'Minimum should be 1')
        self.assertEqual(l5, 1, 'Minimum should be 1')
예제 #2
0
파일: unity.py 프로젝트: abulovic/binner
 def __init__(self, attributes={}):
     self.attributes = attributes
     self.origin = None
     self.record_id = self.version #Added because of compatibility with older code
     if self.location:
         self.location_min = Location.fast_min_str(self.location)
     else:
         self.location_min = sys.maxint