-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
1,382 additions
and
1,142 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] | ||
skip=.tox | ||
not_skip=__init__.py | ||
multi_line_output = 3 | ||
balanced_wrapping = 1 | ||
include_trailing_comma = 1 |
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,10 @@ | ||
[MASTER] | ||
ignore=docs | ||
disable= | ||
missing-docstring, | ||
wildcard-import, | ||
unused-wildcard-import, | ||
too-few-public-methods, | ||
invalid-name, | ||
arguments-differ, | ||
too-many-instance-attributes, |
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,6 @@ | ||
include LICENSE | ||
include MANIFEST.in | ||
graft typus | ||
graft tests | ||
global-exclude __pycache__ | ||
global-exclude *.py[co] |
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
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 |
---|---|---|
|
@@ -13,7 +13,6 @@ Contents | |
|
||
get_started | ||
processors | ||
mixins | ||
utils | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
[pytest] | ||
addopts = | ||
-v | ||
-rs | ||
--cov=typus | ||
--cov-report=term-missing | ||
--pylint | ||
--doctest-modules | ||
--isort |
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,6 @@ | ||
pytest==3.6.3 | ||
pytest-cov==2.5.1 | ||
pytest-pylint==0.11.0 | ||
pytest-mock==1.10.0 | ||
pytest-isort==0.2.0 | ||
Sphinx==1.7.6 |
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,27 +1,21 @@ | ||
from __future__ import (absolute_import, division, print_function, | ||
unicode_literals) | ||
import pytest | ||
|
||
from builtins import * # noqa | ||
|
||
import mock | ||
import unittest2 | ||
from typus import TypusCore, ru_typus | ||
|
||
|
||
class TypusTest(unittest2.TestCase): | ||
@mock.patch('typus.ru_typus.process') | ||
def test_empty(self, mock_process): | ||
self.assertEqual(ru_typus(''), '') | ||
mock_process.assert_not_called() | ||
def test_empty_string(mocker): | ||
mocker.patch('typus.ru_typus.procs') | ||
assert ru_typus('') == '' | ||
ru_typus.procs.run.assert_not_called() | ||
|
||
|
||
def test_debug(self): | ||
self.assertEqual(ru_typus('2mm', debug=True), '2_mm') | ||
def test_debug_true(): | ||
assert ru_typus('2mm', debug=True) == '2_mm' | ||
|
||
|
||
class BaseTypusTest(unittest2.TestCase): | ||
def test_empty(self): | ||
class Testus(TypusCore): | ||
pass | ||
def test_no_processors(): | ||
class Testus(TypusCore): | ||
pass | ||
|
||
with self.assertRaises(AssertionError): | ||
Testus() | ||
with pytest.raises(AssertionError): | ||
Testus() |
Oops, something went wrong.