예제 #1
0
파일: test_misc.py 프로젝트: altrevi2/Cpp
 def test04_repr_db(self):
     db = hashopen(self.filename)
     d = {}
     for i in xrange(100):
         db[repr(i)] = repr(100 * i)
         d[repr(i)] = repr(100 * i)
     db.close()
     db = hashopen(self.filename)
     rp = repr(db)
     self.assertEqual(rp, repr(d))
     db.close()
예제 #2
0
 def test04_repr_db(self) :
     db = hashopen(self.filename)
     d = {}
     for i in xrange(100) :
         db[repr(i)] = repr(100*i)
         d[repr(i)] = repr(100*i)
     db.close()
     db = hashopen(self.filename)
     rp = repr(db)
     self.assertEqual(rp, repr(d))
     db.close()
예제 #3
0
 def test04_repr_db(self) :
     db = hashopen(self.filename)
     d = {}
     for i in xrange(100) :
         db[repr(i)] = repr(100*i)
         d[repr(i)] = repr(100*i)
     db.close()
     db = hashopen(self.filename)
     rp = repr(sorted(db.items()))
     rd = repr(sorted(d.items()))
     self.assertEqual(rp, rd)
     db.close()
예제 #4
0
 def test04_repr_db(self):
     db = hashopen(self.filename)
     d = {}
     for i in xrange(100):
         db[repr(i)] = repr(100 * i)
         d[repr(i)] = repr(100 * i)
     db.close()
     db = hashopen(self.filename)
     rp = repr(sorted(db.items()))
     rd = repr(sorted(d.items()))
     self.assertEqual(rp, rd)
     db.close()
예제 #5
0
 def test03_repr_closed_db(self):
     db = hashopen(self.filename)
     db.close()
     rp = repr(db)
     self.assertEqual(rp, '{}')
예제 #6
0
 def test04_n_flag(self):
     f = hashopen(self.filename, 'n')
     f.close()
예제 #7
0
 def test03_repr_closed_db(self):
     db = hashopen(self.filename)
     db.close()
     rp = repr(db)
     self.assertEqual(rp, '{}')
예제 #8
0
 def test04_n_flag(self):
     f = hashopen(self.filename, "n")
     f.close()