Closed Bug 1771670 Opened 3 years ago Closed 3 years ago

test_integration_git.py etc gets affected by ~/.moz-phab-config

Categories

(Conduit :: moz-phab, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: arai, Assigned: arai)

Details

Attachments

(1 file)

Steps to reproduce:

  1. Have the following lines in the ~/.moz-phab-config file
[submit]
always_blocking = True
  1. run pytest tests/

Actual result:
Multiple tests fail because of trailing ! in the reviewer name

>       assert log.strip() == expected.strip()
E       AssertionError: assert 'Bug 1 - Ą r?...ple.test/D123' == 'Bug 1 - Ą r?...ple.test/D123'
E         - Bug 1 - Ą r?alice
E         + Bug 1 - Ą r?alice!
E         ?                  +
E           
E           Differential Revision: http://example.test/D123

.../review/tests/test_integration_git.py:63: AssertionError

Expected result:

The test doesn't read the config in the current user's HOME, and not affected by it

This is because the config module is imported before modifying the HOME directory in conftest.py.

Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Attachment #9279808 - Attachment description: Bug 1771670 - Disable accessing user-config from the testcase. r=zeid → Bug 1771670 - Disable accessing user-config from the testcase. r=zeid!
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: