I just did a few tests using encrypt_sign() and no passphrase_cb set. The test first succeeded in signing the plain text, which indicates that it was accessing the agent.
I then added a "del os.environ['GPG_AGENT_INFO']" call just before the encrypt_sign() call and got a "Bad passphrase" error instead, indicating that the agent was not being used. Presumably I could have fixed the test program with a passphrase callback (the tests for this behaviour pass).
I just did a few tests using encrypt_sign() and no passphrase_cb set. The test first succeeded in signing the plain text, which indicates that it was accessing the agent.
I then added a "del os.environ[ 'GPG_AGENT_ INFO']" call just before the encrypt_sign() call and got a "Bad passphrase" error instead, indicating that the agent was not being used. Presumably I could have fixed the test program with a passphrase callback (the tests for this behaviour pass).
So a test case would be useful.