No Bug - [mozversioncontrol] xfail 'test_branch.py' with git < 2.22.0, r=bhearsum

The 'git branch --show-current' flag didn't exist prior to that version.

Differential Revision: https://phabricator.services.mozilla.com/D112043
This commit is contained in:
Andrew Halberstadt 2021-04-14 20:49:26 +00:00
parent 11d793af7b
commit 002c099fc4

View File

@ -2,7 +2,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from distutils.version import LooseVersion
import mozunit
import pytest
from mozversioncontrol import get_repository_object
@ -31,6 +34,9 @@ STEPS = {
def test_branch(repo):
vcs = get_repository_object(repo.strpath)
if vcs.name == "git" and LooseVersion(vcs.tool_version) < LooseVersion("2.22.0"):
pytest.xfail("`git branch --show-current` not implemented yet")
if vcs.name == "git":
assert vcs.branch == "master"
else: