def test_offsuitHandRange(self):
        h = HandRangeHoldem.fromString('J9o-J7o')
        self.assertEqual(h.toString(), 'J9o-J7o')
        self.assertEqual(len(h), 36)
        #TODO: no idea how to test HandRangeHoldem.hands()

        # tst alternatives
        h = HandRangeHoldem.fromString('J9o-J7')
        self.assertEqual(h.toString(), 'J9o-J7o')

        h = HandRangeHoldem.fromString('J9-J7o')
        self.assertEqual(h.toString(), 'J9o-J7o')
	def test_offsuitHandRange(self):
		h = HandRangeHoldem.fromString('J9o-J7o')
		self.assertEqual(h.toString(), 'J9o-J7o')
		self.assertEqual(len(h), 36)
		#TODO: no idea how to test HandRangeHoldem.hands()
		
		# tst alternatives
		h = HandRangeHoldem.fromString('J9o-J7')
		self.assertEqual(h.toString(), 'J9o-J7o')
		
		h = HandRangeHoldem.fromString('J9-J7o')
		self.assertEqual(h.toString(), 'J9o-J7o')
    def testRangeAccumulation(self):
        h = HandRangeHoldem.fromString('K9s, K8s, K7s')
        self.assertEqual(h.toString(), 'K9s-K7s')
        self.assertEqual(len(h), 12)
        #TODO: no idea how to test HandRangeHoldem.hands()

        h = HandRangeHoldem.fromString('TT, 99, 88')
        self.assertEqual(h.toString(), 'TT-88')
        self.assertEqual(len(h), 18)

        # no range accumulation here (bugfix)
        h = HandRangeHoldem.fromString('75s, 84s')
        self.assertEqual(h.toString(), '84s, 75s')
	def testRangeAccumulation(self):
		h = HandRangeHoldem.fromString('K9s, K8s, K7s')
		self.assertEqual(h.toString(), 'K9s-K7s')
		self.assertEqual(len(h), 12)
		#TODO: no idea how to test HandRangeHoldem.hands()
		
		h = HandRangeHoldem.fromString('TT, 99, 88')
		self.assertEqual(h.toString(), 'TT-88')
		self.assertEqual(len(h), 18)
		
		# no range accumulation here (bugfix)
		h = HandRangeHoldem.fromString('75s, 84s')
		self.assertEqual(h.toString(), '84s, 75s')
	def test_allHands(self):
		rng = ', '.join((
		'22+', 
		'A2s+','K2s+','Q2s+','J2s+','T2s+','92s+','82s+','72s+','62s+','52s+','42s+','32s', 
		'A2o+','K2o+','Q2o+','J2o+','T2o+','92o+','82o+','72o+','62o+','52o+','42o+','32o',
		))
		
		h = HandRangeHoldem.fromString('random')
		self.assertEqual(h.toString(), 'random')
		self.assertEqual(len(h), 1326)
		
		h = HandRangeHoldem.fromString(rng)
		self.assertEqual(h.toString(), 'random')
		self.assertEqual(len(h), 1326)
    def test_allHands(self):
        rng = ', '.join((
            '22+',
            'A2s+',
            'K2s+',
            'Q2s+',
            'J2s+',
            'T2s+',
            '92s+',
            '82s+',
            '72s+',
            '62s+',
            '52s+',
            '42s+',
            '32s',
            'A2o+',
            'K2o+',
            'Q2o+',
            'J2o+',
            'T2o+',
            '92o+',
            '82o+',
            '72o+',
            '62o+',
            '52o+',
            '42o+',
            '32o',
        ))

        h = HandRangeHoldem.fromString('random')
        self.assertEqual(h.toString(), 'random')
        self.assertEqual(len(h), 1326)

        h = HandRangeHoldem.fromString(rng)
        self.assertEqual(h.toString(), 'random')
        self.assertEqual(len(h), 1326)
	def test_singleHand(self):
		h = HandRangeHoldem.fromString('JhTd')
		self.assertEqual(h.toString(), 'JhTd')
		self.assertEqual(len(h), 1)
 def test_suitedAscendingAndUnderrange(self):
     h = HandRangeHoldem.fromString('J8s+, J6s-J5s')
     self.assertEqual(h.toString(), 'J8s+, J6s-J5s')
     self.assertEqual(len(h), 20)
 def test_onePair(self):
     h = HandRangeHoldem.fromString('TT')
     self.assertEqual(h.toString(), 'TT')
     self.assertEqual(len(h), 6)
 def test_singleHand(self):
     h = HandRangeHoldem.fromString('JhTd')
     self.assertEqual(h.toString(), 'JhTd')
     self.assertEqual(len(h), 1)
 def test_pairAscendingAndUnderrange(self):
     h = HandRangeHoldem.fromString('TT+, 88-77')
     self.assertEqual(h.toString(), 'TT+, 88-77')
     self.assertEqual(len(h), 42)
	def test_nosuitHandRangeAndOverhand(self):
		h = HandRangeHoldem.fromString('KQ, J9-J7')
		self.assertEqual(h.toString(), 'KQs, J9s-J7s, KQo, J9o-J7o')
		self.assertEqual(len(h), 64)
	def test_pairAscendingAndUnderrange(self):
		h = HandRangeHoldem.fromString('TT+, 88-77')
		self.assertEqual(h.toString(), 'TT+, 88-77')
		self.assertEqual(len(h), 42)
	def test_offsuitAscendingAndUnderrange(self):
		h = HandRangeHoldem.fromString('J8o+, J6o-J5o')
		self.assertEqual(h.toString(), 'J8o+, J6o-J5o')
		self.assertEqual(len(h), 60)
	def test_onePair(self):
		h = HandRangeHoldem.fromString('TT')
		self.assertEqual(h.toString(), 'TT')
		self.assertEqual(len(h), 6)
	def test_offsuitAscending(self):
		h = HandRangeHoldem.fromString('J8o+')
		self.assertEqual(h.toString(), 'J8o+')
		self.assertEqual(len(h), 36)
	def test_suitedAscendingAndUnderrange(self):
		h = HandRangeHoldem.fromString('J8s+, J6s-J5s')
		self.assertEqual(h.toString(), 'J8s+, J6s-J5s')
		self.assertEqual(len(h), 20)
	def test_suitedAscending(self):
		h = HandRangeHoldem.fromString('J8s+')
		self.assertEqual(h.toString(), 'J8s+')
		self.assertEqual(len(h), 12)
 def test_suitedHandRangeAndUnderhand(self):
     h = HandRangeHoldem.fromString('65s, J9s-J7s')
     self.assertEqual(h.toString(), 'J9s-J7s, 65s')
     self.assertEqual(len(h), 16)
 def test_nosuitHandRangeAndOverhand(self):
     h = HandRangeHoldem.fromString('KQ, J9-J7')
     self.assertEqual(h.toString(), 'KQs, J9s-J7s, KQo, J9o-J7o')
     self.assertEqual(len(h), 64)
	def test_noRange(self):
		h = HandRangeHoldem.fromString('')
		self.assertEqual(h.toString(), '')
		self.assertEqual(len(h), 0)
	def test_pairAscending(self):
		h = HandRangeHoldem.fromString('TT+')
		self.assertEqual(h.toString(), 'TT+')
		self.assertEqual(len(h), 30)
 def test_noRange(self):
     h = HandRangeHoldem.fromString('')
     self.assertEqual(h.toString(), '')
     self.assertEqual(len(h), 0)
	def test_pairRange(self):
		h = HandRangeHoldem.fromString('TT-88')
		self.assertEqual(h.toString(), 'TT-88')
		self.assertEqual(len(h), 18)
 def test_nosuitHandRangeAndUnderhand(self):
     h = HandRangeHoldem.fromString('65, J9-J7')
     self.assertEqual(h.toString(), 'J9s-J7s, 65s, J9o-J7o, 65o')
     self.assertEqual(len(h), 64)
	def test_pairRangeAndOverpair(self):
		h = HandRangeHoldem.fromString('AA, TT-88')
		self.assertEqual(h.toString(), 'AA, TT-88')
		self.assertEqual(len(h), 24)
 def test_pairAscending(self):
     h = HandRangeHoldem.fromString('TT+')
     self.assertEqual(h.toString(), 'TT+')
     self.assertEqual(len(h), 30)
	def test_pairRangeAndUnderpair(self):
		h = HandRangeHoldem.fromString('33, TT-88')
		self.assertEqual(h.toString(), 'TT-88, 33')
		self.assertEqual(len(h), 24)
 def test_suitedAscending(self):
     h = HandRangeHoldem.fromString('J8s+')
     self.assertEqual(h.toString(), 'J8s+')
     self.assertEqual(len(h), 12)
	def test_suitedHand(self):
		h = HandRangeHoldem.fromString('JTs')
		self.assertEqual(h.toString(), 'JTs')
		self.assertEqual(len(h), 4)
 def test_offsuitAscending(self):
     h = HandRangeHoldem.fromString('J8o+')
     self.assertEqual(h.toString(), 'J8o+')
     self.assertEqual(len(h), 36)
 def test_pairRange(self):
     h = HandRangeHoldem.fromString('TT-88')
     self.assertEqual(h.toString(), 'TT-88')
     self.assertEqual(len(h), 18)
 def test_offsuitAscendingAndUnderrange(self):
     h = HandRangeHoldem.fromString('J8o+, J6o-J5o')
     self.assertEqual(h.toString(), 'J8o+, J6o-J5o')
     self.assertEqual(len(h), 60)
 def test_pairRangeAndUnderpair(self):
     h = HandRangeHoldem.fromString('33, TT-88')
     self.assertEqual(h.toString(), 'TT-88, 33')
     self.assertEqual(len(h), 24)
	def test_suitedHandRangeAndUnderhand(self):
		h = HandRangeHoldem.fromString('65s, J9s-J7s')
		self.assertEqual(h.toString(), 'J9s-J7s, 65s')
		self.assertEqual(len(h), 16)
	def test_nosuitHandRangeAndUnderhand(self):
		h = HandRangeHoldem.fromString('65, J9-J7')
		self.assertEqual(h.toString(), 'J9s-J7s, 65s, J9o-J7o, 65o')
		self.assertEqual(len(h), 64)
 def test_pairRangeAndOverpair(self):
     h = HandRangeHoldem.fromString('AA, TT-88')
     self.assertEqual(h.toString(), 'AA, TT-88')
     self.assertEqual(len(h), 24)
	def test_offsuitHand(self):
		h = HandRangeHoldem.fromString('JTo')
		self.assertEqual(h.toString(), 'JTo')
		self.assertEqual(len(h), 12)
 def test_suitedHand(self):
     h = HandRangeHoldem.fromString('JTs')
     self.assertEqual(h.toString(), 'JTs')
     self.assertEqual(len(h), 4)
	def test_offsuitHandRangeAndUnderhand(self):
		h = HandRangeHoldem.fromString('65o, J9o-J7o')
		self.assertEqual(h.toString(), 'J9o-J7o, 65o')
		self.assertEqual(len(h), 48)
 def test_offsuitHand(self):
     h = HandRangeHoldem.fromString('JTo')
     self.assertEqual(h.toString(), 'JTo')
     self.assertEqual(len(h), 12)
 def test_nosuitHandRange(self):
     h = HandRangeHoldem.fromString('J9-J7')
     self.assertEqual(h.toString(), 'J9s-J7s, J9o-J7o')
     self.assertEqual(len(h), 48)
 def test_offsuitHandRangeAndUnderhand(self):
     h = HandRangeHoldem.fromString('65o, J9o-J7o')
     self.assertEqual(h.toString(), 'J9o-J7o, 65o')
     self.assertEqual(len(h), 48)
	def test_nosuitHandRange(self):
		h = HandRangeHoldem.fromString('J9-J7')
		self.assertEqual(h.toString(), 'J9s-J7s, J9o-J7o')
		self.assertEqual(len(h), 48)