Closed Bug 1517621 Opened Last year Closed 11 months ago

Running tryselect python-tests causes try_task_config.json to be added to the local repo

Categories

(Firefox Build System :: Try, defect)

defect
Not set

Tracking

(firefox66 fixed)

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: ahal, Assigned: ahal)

Details

Attachments

(1 file)

STR:
[~/dev/mozilla-central](5826b23)$ hg status    
[~/dev/mozilla-central](5826b23)$ ./mach python-test test_again.py
 ...
 0:08.89 Return code from mach python-test: 0
[~/dev/mozilla-central](5826b23)$ hg status                       
! try_task_config.json

This is happening because while we do Mock out certain VCS operations [1], we don't mock out "add_remove_files" [2].

Instead of manually mocking out individual attributes, we should just mock out the entire "vcs" object using a MagicMock.

[1] https://searchfox.org/mozilla-central/source/tools/tryselect/test/conftest.py#22
[2] https://searchfox.org/mozilla-central/source/tools/tryselect/push.py#130
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/165704210c3f
[tryselect] Mock out entire vcs object in python tests, r=jmaher
https://hg.mozilla.org/mozilla-central/rev/165704210c3f
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.