~cjwatson/launchpadlib/testing-requires

« back to all changes in this revision

Viewing changes to src/launchpadlib/testing/helpers.py

[r=wgrant] Postpone keyring.errors import.

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
    # The real keyring package should never be imported during tests.
134
134
    assert_keyring_not_imported()
135
135
    launchpadlib.credentials.keyring = fake
 
136
    launchpadlib.credentials.NoKeyringError = RuntimeError
136
137
    try:
137
138
        yield
138
139
    finally:
139
140
        del launchpadlib.credentials.keyring
 
141
        del launchpadlib.credentials.NoKeyringError
140
142
 
141
143
 
142
144
class FauxSocketModule: