[Python-Dev] How to test this? (original) (raw)

Skip Montanaro skip@pobox.com
Mon, 5 May 2003 16:24:59 -0500


Martin> Make sure you use -kb in the cvs add. 

Thanks, I'd forgotten about that.

Martin> Apart from that, it would be fine by me - except that I recall
Martin> that the file format is endianness-sensitive, so you should make
Martin> sure that the test passes on machines of both endiannesses
Martin> before adding the file.

It appears the database itself accounts for the endianness of the file. I copied my test db file from my Mac to a Linux PC. struct.unpack("=l", f.read(4)) showed different values on the two systems (0x61561 vs 0x61150600) but bsddb185 on both systems could read the file. This is a very nice property of Berkeley DB in general. I copy db files from the spambayes project all the time. rsync(1) sure beats the heck out of dumping and reloading a 20+MB file all the time.

Skip