Convert py tests #40

Closed
wants to merge 2 commits into
from

Projects

None yet

3 participants

@hpaulj

This replaces the issue #39 pull request

All additions are files in test
test_argparse_mocha.js - mocha test cases derived from test_argparse.py

These files might be handy if we want to extract more tests, or generate them in different form.
Being development code they might not belong in the test directory
test_argparse.py - Python original
test_argparse_convert.py - JSON serializes the tests that it can (76 'classes')
test_argparse.coffee - writes mocha test from the JSON object

hpaulj added some commits Jan 5, 2013
@hpaulj hpaulj files to convert test_argparse.py to JS mocha tests.
test_argparse_convert.py JSON serializes as many py test classes as it easily can.

test_argparse.coffee writes (to stdout) a mocha test file
alternatively it can run rests directly and display diagnostic output.
652b0cb
@hpaulj hpaulj cleanup documentation of test_argparse* files d2d8a9a
@puzrin
Nodeca member
  1. Do you think, that convertor scripts are really needed? That seems to be once operation, never repeated in the future.
  2. Do converted tests intersects with existing ones? Wouldn't it be better to split that big file in something more short and do some cleanup?

Also, already existing tests (not in this commit) became almost unmaintainable. I don't see logic in splitting by files and in file names. IMHO, that should be cleared before merging new tests.

I did partial cleanup, and now only files have to be reorganized. You can wait until @shkuropat do it, or suggest your own improvments. Then we could return to this pull-request.

PS. I'd like to add you to major contrubutors in argparse description. Could you tell me your First/Last name ?

@puzrin
Nodeca member

PPS. Idea to atomate tests conversion from python to node is nice. Probably, that could be independent project - may be, someone will use it nex time, when convert another package to node.

@hpaulj

my name: Paul Jacobson

@puzrin
Nodeca member

https://github.com/nodeca/argparse#contributors

I hope, this tests will be merged soon. Sorry for delay.

@shkuropat

Test processed, but still need rewrite text to single style.

@shkuropat

My apologies about delay, too big load on work.

@puzrin puzrin added a commit that referenced this pull request Feb 4, 2013
@puzrin puzrin code cleanup, related to #40 ccd1df2
@puzrin
Nodeca member

Yeaaaahhh! you did it :) . I close issue, since consider goals reached:

  1. Tests coverage greately improved.
  2. Test suites format stabilised.

There are couple or places, that can be improved, but are not blockers now:

  • descriptions ca be reviewed (probably, i did some minor mistakes at cleanup)
  • groups/child_groups tests can have better description & probably could be joined

If someone wish to do it - feel free to make pull requests. But even now, tests are good enougth for future development.

@puzrin puzrin closed this Feb 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment