Saltar al contenido ForoHackers

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

Ingeniería de datosFabricaciónPruebas
#22851 · · Citar · Denunciar

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 · · Citar · Denunciar

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 · · Citar · Denunciar

@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.

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder