-
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* travis: activate c coverage measurement * appveyor: only build master branch and PRs * cis: reduce appveyor build matrix, fix typo in travis * codecov: add codecov config * tests: improve tests for c extensions
- Loading branch information
1 parent
e10abb3
commit 21d6bf8
Showing
12 changed files
with
906 additions
and
140 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
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,29 @@ | ||
codecov: | ||
notify: | ||
require_ci_to_pass: yes | ||
|
||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "70...100" | ||
|
||
status: | ||
project: yes | ||
patch: yes | ||
changes: no | ||
|
||
parsers: | ||
gcov: | ||
branch_detection: | ||
conditional: yes | ||
loop: yes | ||
method: no | ||
macro: no | ||
|
||
comment: | ||
layout: "header, diff" | ||
behavior: default | ||
require_changes: no | ||
|
||
ignore: | ||
- 'enaml/core/byteplay' |
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,37 @@ | ||
#------------------------------------------------------------------------------ | ||
# Copyright (c) 2018, Nucleic Development Team. | ||
# | ||
# Distributed under the terms of the Modified BSD License. | ||
# | ||
# The full license is in the file COPYING.txt, distributed with this software. | ||
#------------------------------------------------------------------------------ | ||
import pytest | ||
|
||
from enaml.c_compat import _fix_co_filename | ||
|
||
|
||
def test_fix_co_filename(): | ||
"""Test fix_co_filename. | ||
""" | ||
def f(): | ||
a = [i for i in range(10)] | ||
|
||
_fix_co_filename(f.__code__, 'test') | ||
assert f.__code__.co_filename == 'test' | ||
|
||
|
||
def test_fix_co_filename_bad_arguments(): | ||
"""Test handling bad arguments to fix_co_filename. | ||
""" | ||
with pytest.raises(TypeError) as excinfo: | ||
_fix_co_filename(None, None) | ||
assert 'CodeType' in excinfo.exconly()\ | ||
|
||
def f(): | ||
pass | ||
|
||
with pytest.raises(TypeError) as excinfo: | ||
_fix_co_filename(f.__code__, None) | ||
assert 'str' in excinfo.exconly() |
Oops, something went wrong.