telepy_old icon indicating copy to clipboard operation
telepy_old copied to clipboard

Add unit tests for TL module and fix some bugs

Open lds56 opened this issue 10 years ago • 2 comments

Changes

Issue

I choose nose as the test tool and it works well with python2.7. However, using nose with python3 can be a little troublesome. Of course, the unit tests themselves are okay for either py2 or py3 so you can run the tests in other way you like.

lds56 avatar Apr 21 '15 06:04 lds56

Dude, you are the boss! Than you for the effort!!

I'm personally not experienced in python testing so I appreciate it a lot :) On Apr 21, 2015 8:59 AM, "Rui Chen" [email protected] wrote:

Changes

  • Make the loading path of son file absolute
  • Add unit tests for TL.serialize_method, TL.serialize_obj and TL.deserialize
  • The test samples are from Creating an Authorization Key (Samples) https://core.telegram.org/mtproto/samples-auth_key#4-encrypted-data-generation

Issue

I choose nose https://nose.readthedocs.org/en/latest/ as the test tool and it works well with python2.7. However, using nose with python3 can be a little troublesome https://nose.readthedocs.org/en/latest/#python3. Of course, the unit tests themselves are okay for either py2 or py3 so you

can run the tests in other way you like.

You can view, comment on, or merge this pull request online at:

https://github.com/griganton/telepy/pull/7 Commit Summary

  • fix JSON loading fix bug
  • add unittest for TL module

File Changes

  • M .gitignore https://github.com/griganton/telepy/pull/7/files#diff-0 (10)
  • M TL.py https://github.com/griganton/telepy/pull/7/files#diff-1 (25)
  • M mtproto.py https://github.com/griganton/telepy/pull/7/files#diff-2 (1)
  • M testing.py https://github.com/griganton/telepy/pull/7/files#diff-3 (4)
  • A tests/TL_test.py https://github.com/griganton/telepy/pull/7/files#diff-4 (51)

Patch Links:

  • https://github.com/griganton/telepy/pull/7.patch
  • https://github.com/griganton/telepy/pull/7.diff

— Reply to this email directly or view it on GitHub https://github.com/griganton/telepy/pull/7.

awesomebytes avatar Apr 21 '15 07:04 awesomebytes

I'm happy as well for hearing that it can be of help 😊

lds56 avatar Apr 21 '15 07:04 lds56