forked from ungoogled-software/ungoogled-chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes ungoogled-software#958
- Loading branch information
Showing
9 changed files
with
94 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[run] | ||
branch = True | ||
parallel = True | ||
omit = tests/* | ||
|
||
[report] | ||
# Regexes for lines to exclude from consideration | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
|
||
# Don't complain about missing debug-only code: | ||
def __repr__ | ||
if self\.debug | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
# Don't complain if non-runnable code isn't run: | ||
if 0: | ||
if __name__ == .__main__.: |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[pytest] | ||
testpaths = tests | ||
#filterwarnings = | ||
# error | ||
# ignore::DeprecationWarning | ||
#addopts = --cov-report term-missing --hypothesis-show-statistics -p no:warnings | ||
addopts = --cov=. --cov-config=.coveragerc --cov-report term-missing -p no:warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -eux | ||
|
||
_root_dir=$(dirname $(dirname $(readlink -f $0))) | ||
cd ${_root_dir}/devutils | ||
python3 -m pytest -c ${_root_dir}/devutils/pytest.ini |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# -*- coding: UTF-8 -*- | ||
|
||
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
"""Test check_patch_files.py""" | ||
|
||
import tempfile | ||
from pathlib import Path | ||
|
||
from ..check_patch_files import check_series_duplicates | ||
|
||
|
||
def test_check_series_duplicates(): | ||
"""Test check_series_duplicates""" | ||
with tempfile.TemporaryDirectory() as tmpdirname: | ||
patches_dir = Path(tmpdirname) | ||
series_path = Path(tmpdirname, 'series') | ||
|
||
# Check no duplicates | ||
series_path.write_text('\n'.join([ | ||
'a.patch', | ||
'b.patch', | ||
'c.patch', | ||
])) | ||
assert not check_series_duplicates(patches_dir) | ||
|
||
# Check duplicates | ||
series_path.write_text('\n'.join([ | ||
'a.patch', | ||
'b.patch', | ||
'c.patch', | ||
'a.patch', | ||
])) | ||
assert check_series_duplicates(patches_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
# TODO: Figure out why this file is needed for Pylint to work when devutils doesn't need it | ||