Skip to the content ForoHackers
Log inJoin

The spool box is labelled 007. Why is my inventory test cheering for seven?

Data engineeringManufacturingTesting
#22851 · · Quote · Report

My Python converter reads two vendor-supplied toy catalogues. One calls its red thread 007, the other calls its yellow thread 7. Both come out as integer seven in my inventory. The test just compared how many distinct numbers survived and called this a success.

#22888 · · Quote · Report

Your database key can be the pair (catalogue, original code). Keep the original code a string if those characters occur on the actual spool. A test should ask for each spool and compare the returned colour and printed code, not just count keys.

#22889 · · Quote · Report

@blue-ishly Found a tougher fixture: a third catalogue with the exact characters 007 on a grey spool. The unit test now calls the pair lookup for all three and compares the colour with the inventory. It gets all three right; preserving the leading zero alone would still merge two. I have laid the grey spool on top of the old test report.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply