Exemplo n.º 1
0
 def test_sd_fromkeys(self):
     x = sorteddict.fromkeys([1, 2, 3, 4, 5, 6])
     assert len(x) == 6
     assert x[6] is None
     x = sorteddict.fromkeys((1, 2, 3, 4, 5), 'abc')
     assert len(x) == 5
     assert x[5] == 'abc'
Exemplo n.º 2
0
 def test_sd_fromkeys(self):
     x = sorteddict.fromkeys([1,2,3,4,5,6])
     assert len(x) == 6
     assert x[6] is None
     x = sorteddict.fromkeys((1,2,3,4,5), 'abc')
     assert len(x) == 5
     assert x[5] == 'abc'
Exemplo n.º 3
0
 def test_sd_setkeys(self):
     x = sorteddict.fromkeys((1, 2, 3, 4, 5), 'abc')
     if not self.nopytest:
         py.test.raises(TypeError, "x.setkeys((5, 3, 1, 2, 4,))")
Exemplo n.º 4
0
 def test_sd_setkeys(self):
     x = sorteddict.fromkeys((1,2,3,4,5), 'abc')
     if not self.nopytest:
         py.test.raises(TypeError, "x.setkeys((5, 3, 1, 2, 4,))")