Closed Bug 1275288 Opened 4 years ago Closed 4 years ago

Add harness unit tests for exceptions raised by _load_testvars

Categories

(Testing :: Marionette, defect)

Version 3
defect
Not set

Tracking

(firefox49 fixed)

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: vakila, Assigned: vakila)

Details

(Keywords: pi-marionette-harness-tests)

Attachments

(1 file)

Test that MarionetteTestRunner._load_testvars raises
the expected exceptions when testvars filepaths are 
nonexistent or have improperly formatted JSON data
Test that MarionetteTestRunner._load_testvars raises
the expected exceptions when testvars filepaths are
nonexistent or have improperly formatted JSON data

Review commit: https://reviewboard.mozilla.org/r/54900/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/54900/
Attachment #8755958 - Flags: review?(mjzffr)
Maja, per your comment on Bug 1275269, I'll remove the comments from this patch as they're rather redundant. I'll just wait for your review in case anything else needs to be changed.
Comment on attachment 8755958 [details]
MozReview Request: Bug 1275288 - Test exception raising in _load_testvars; r?maja_zf

https://reviewboard.mozilla.org/r/54900/#review51594

Looks good.

::: testing/marionette/harness/marionette/tests/harness_unit/test_marionette_runner.py:291
(Diff revision 1)
>          assert runner.record_crash() == has_crashed
>          _check_crash_counts(has_crashed, runner, runner.marionette)
>  
>  
> +def test_load_testvars_throws_expected_errors(mach_parsed_kwargs):
> +    mach_parsed_kwargs

Extra line to be deleted?

nit: Please also move your new test to be next to the other "test_vars" test in the module. (Aside: we'll probably want to reorganize these tests eventually to not all be in one module. We can revisit that in the future.)
Comment on attachment 8755958 [details]
MozReview Request: Bug 1275288 - Test exception raising in _load_testvars; r?maja_zf

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/54900/diff/1-2/
Attachment #8755958 - Flags: review?(mjzffr)
Comment on attachment 8755958 [details]
MozReview Request: Bug 1275288 - Test exception raising in _load_testvars; r?maja_zf

https://reviewboard.mozilla.org/r/54900/#review51752

Great!
Attachment #8755958 - Flags: review?(mjzffr) → review+
https://hg.mozilla.org/mozilla-central/rev/fd985ed46ae4
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.