Closed Bug 993660 Opened 10 years ago Closed 10 years ago

Test infer_arguments()

Categories

(Developer Services :: Mercurial: bzexport, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sfink, Assigned: sfink)

Details

Attachments

(1 file)

bzexport really really needs tests.
But I'm too much of a Python newbie to know the currently recommended way to do tests. So I'll put this up for review to force you to tell me. ;-)

I ran this from within the bzexport directory with

  PYTHONPATH=.. python test/test_infer_arguments.py

which probably is NOT the recommended way.
Attachment #8403538 - Flags: review?(emorley)
If you just put your test.py in the hgext directory it should be able to import bzexport directly. If you're not keen on having it up that far then you'll have to munge sys.path, something like:
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
Comment on attachment 8403538 [details] [diff] [review]
Test infer_arguments()

gps has just added support for Mercurial style tests in https://hg.mozilla.org/hgcustom/version-control-tools/rev/7085790ff3af - I'll switch the review to him since it would be good to have a coordinated approach if possible :-)
Attachment #8403538 - Flags: review?(emorley) → review?(gps)
Comment on attachment 8403538 [details] [diff] [review]
Test infer_arguments()

Review of attachment 8403538 [details] [diff] [review]:
-----------------------------------------------------------------

I'm out of commission for a while. Redirecting review.

::: hgext/bzexport/test/test_infer_arguments.py
@@ +1,1 @@
> +import unittest

Add license.
Attachment #8403538 - Flags: review?(gps) → review?(ted)
Comment on attachment 8403538 [details] [diff] [review]
Test infer_arguments()

Review of attachment 8403538 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, good to have tests for this stuff.
Attachment #8403538 - Flags: review?(ted) → review+
http://hg.mozilla.org/hgcustom/version-control-tools/rev/d371a48ca617
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Other Applications → Developer Services
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: