pyauth / pyotp

Python One-Time Password Library
https://pyauth.github.io/pyotp/
Other
2.96k stars 323 forks source link

Add extended range support to TOTP.verify #19

Closed zeevro closed 8 years ago

kislyuk commented 8 years ago

Please add a test. You'll want a new test class in https://github.com/pyotp/pyotp/blob/master/test.py#L143. You can just look at Travis output if you don't want to figure out how to run tests locally.

kislyuk commented 8 years ago

Thanks for opening the PR, this is a useful change. Once the test is in place to exercise these new options, I can merge it.

kislyuk commented 8 years ago

I'd like to make the tests pass. They seem to time out at the moment. Do the tests pass for you locally?

zeevro commented 8 years ago

They pass for me locally in both 2.7.6 and 3.4.3.

Update: I accidentally ran the master instead of the branch with the fix. The test tries time 0 with validity window 1, which tries to generate an OTP for time -1, and that stalls the test. I'll just change the time.

On Tue, Oct 20, 2015 at 8:32 PM, Andrey Kislyuk notifications@github.com wrote:

I'd like to make the tests pass. They seem to time out at the moment. Do the tests pass for you locally?

— Reply to this email directly or view it on GitHub https://github.com/pyotp/pyotp/pull/19#issuecomment-149641327.

zeevro commented 8 years ago

There. All the tests pass and coverage is good. :)

kislyuk commented 8 years ago

Excellent, thanks!