зеркало из https://github.com/mozilla/bugbug.git
18 строки
738 B
Python
18 строки
738 B
Python
# -*- coding: utf-8 -*-
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# 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/.
|
|
|
|
import pytest
|
|
|
|
from bugbug.commit_features import CommitExtractor, author_experience, reviewers_num
|
|
from bugbug.feature_cleanup import fileref, url
|
|
|
|
|
|
def test_CommitExtractor():
|
|
CommitExtractor([reviewers_num(), author_experience()], [fileref(), url()])
|
|
with pytest.raises(AssertionError):
|
|
CommitExtractor([reviewers_num(), author_experience()], [fileref(), fileref()])
|
|
with pytest.raises(AssertionError):
|
|
CommitExtractor([author_experience(), author_experience()], [fileref(), url()])
|