cli_spec fails with gpg 2.1.20
cli_spec:28 fails with gnupg 2.1.20 on Arch Linux. gpg doesn't import the secret key but behaves as if it knew the key already, even though the list of secret keys is empty:
secret keys before: []
import secret result: #<GPGME::ImportResult:0x0000000326fb30 @considered=1, @no_user_id=0, @imported=0, @imported_rsa=0, @unchanged=0, @new_user_ids=0, @new_sub_keys=0, @new_signatures=1, @new_revocations=0, @secret_read=1, @secret_imported=0, @secret_unchanged=0, @not_imported=0, @imports=[#<GPGME::ImportStatus:0x0000000326fa68 @fpr="0392CF72B345256BB730049789226FD6A42B2A7A", @result=0, @status=4, @action="imported">]>
secret keys after: []
The issue didn't occur with 2.1.19.
I have no clue yet what's happening here. The Changelog of gpg doesn't list anything I find suspicious.