-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from unmade/fix-coverage
Fix coverage
- Loading branch information
Showing
7 changed files
with
26 additions
and
5 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,6 @@ | ||
[settings] | ||
line_length=88 | ||
multi_line_output=3 | ||
include_trailing_comma=true | ||
known_first_party=thriftpyi | ||
default_section=THIRDPARTY |
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,4 +1,5 @@ | ||
import click | ||
|
||
from thriftpyi.main import thriftpyi | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
from importlib import resources | ||
|
||
from jinja2 import Template | ||
|
||
from thriftpyi.entities import Content | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
|
||
import pytest | ||
from click.testing import CliRunner | ||
|
||
from thriftpyi.cli import main | ||
|
||
|
||
|
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,16 @@ | ||
from unittest import mock | ||
|
||
from thriftpyi.utils import _get_binary as get_binary | ||
|
||
# This should be redo with 'skipif' and different | ||
# thriftpy2 versions (old one and the one with binary support) | ||
|
||
|
||
def test_get_binary_returns_str(): | ||
with mock.patch("thriftpy2.thrift.TType.BINARY", 11): | ||
assert get_binary([]) == "str" | ||
|
||
|
||
def test_get_binary_returns_bytes(): | ||
with mock.patch("thriftpy2.thrift.TType.BINARY", 18): | ||
assert get_binary([]) == "bytes" |