-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I'm learing github actions and codecov integration. My comit not passing CI because my new code doesn't have enough test coverage. 馃++
- Loading branch information
1 parent
4bb0eb1
commit 68d24d8
Showing
1 changed file
with
50 additions
and
0 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,50 @@ | ||
#!/usr/bin/env python3 | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
# test pargs.py to make codecov happy | ||
|
||
import pytest | ||
|
||
from pymake import pargs | ||
|
||
def test_usage(): | ||
pargs.usage() | ||
|
||
def test_args(): | ||
a = pargs.Args() | ||
|
||
@pytest.mark.skip(reason="sys.exit causes pytest to error") | ||
def test_parse_args_help(): | ||
args = pargs.parse_args(('-h',)) | ||
args = pargs.parse_args(('--help',)) | ||
|
||
def test_parse_args_always_make(): | ||
args = pargs.parse_args(('-B', '-f', '/dev/null')) | ||
assert args.always_make | ||
|
||
args = pargs.parse_args(('--always-make', '-f', '/dev/null')) | ||
assert args.always_make | ||
|
||
def test_parse_args_file(): | ||
args = pargs.parse_args(('-f', '/dev/null')) | ||
assert args.filename == "/dev/null" | ||
|
||
args = pargs.parse_args(('--file', '/dev/null')) | ||
assert args.filename == "/dev/null" | ||
|
||
args = pargs.parse_args(('--makefile', '/dev/null')) | ||
assert args.filename == "/dev/null" | ||
|
||
def test_parse_args_sexpr(): | ||
args = pargs.parse_args(('-S', '-f', '/dev/null')) | ||
assert args.filename == "/dev/null" | ||
assert args.s_expr | ||
|
||
def test_no_builtin_rules(): | ||
args = pargs.parse_args(('-r', '-f', '/dev/null')) | ||
assert args.filename == "/dev/null" | ||
|
||
args = pargs.parse_args(('--no-builtin-rules', '-f', '/dev/null')) | ||
assert args.filename == "/dev/null" | ||
assert args.no_builtin_rules | ||
|