canonical.database.harness._get_locals calls execute_zcml_for_scripts, then executes script.zcml itself. Unfortunately, execute_zcml_for_scripts executes script.zcml itself, so all the ZCML is loaded twice. This means that "make harness" has duplicate subscriber registrations, causing calls like factory.makeBug() to fail with unique constraint violations.
To fix this, I've removed the direct execution of script.zcml.
To QA, verify that factory.makeBug() works in "make harness".
canonical. database. harness. _get_locals calls execute_ zcml_for_ scripts, then executes script.zcml itself. Unfortunately, execute_ zcml_for_ scripts executes script.zcml itself, so all the ZCML is loaded twice. This means that "make harness" has duplicate subscriber registrations, causing calls like factory.makeBug() to fail with unique constraint violations.
To fix this, I've removed the direct execution of script.zcml.
To QA, verify that factory.makeBug() works in "make harness".