Skip to content

Commit 7bf26e7

Browse files
committed
add pytest.ini and remove noused print
1 parent cd9cea9 commit 7bf26e7

File tree

5 files changed

+3
-11
lines changed

5 files changed

+3
-11
lines changed

pytest.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[pytest]
2+
addopts = --cov hobbit_core --cov=tests --cov-report term-missing -s -x -v -p no:warnings

tests/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99
class BaseTest(object):
1010
root_path = os.path.split(os.path.abspath(__name__))[0]
1111

12-
def setup_method(self, method):
13-
print('\n{}::{}'.format(type(self).__name__, method.__name__))
14-
15-
def teardown_method(self, method):
16-
pass
17-
1812

1913
def rmdir(path):
2014
if os.path.exists(path):

tests/test_hobbit.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ class TestHobbit(BaseTest):
1212

1313
def setup_method(self, method):
1414
rmdir(self.wkdir)
15-
super(TestHobbit, self).setup_method(method)
1615

1716
def teardown_method(self, method):
1817
os.chdir(self.root_path)
1918
rmdir(self.wkdir)
20-
super(TestHobbit, self).teardown_method(method)
2119

2220
def test_hobbit_cmd(self):
2321
runner = CliRunner()

tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_dict2object(self):
1919

2020
# test getattr
2121
with pytest.raises(AttributeError):
22-
print(obj.b)
22+
obj.b
2323

2424
def test_secure_filename(self):
2525
filenames = (

tests/views.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
@bp.route('/use_kwargs_with_partial/', methods=['POST'])
1111
@use_kwargs(UserSchema(partial=True))
1212
def use_kwargs_with_partial(**kwargs):
13-
print(kwargs)
1413
return jsonify({k: v or None for k, v in kwargs.items()})
1514

1615

1716
@bp.route('/use_kwargs_without_partial/', methods=['POST'])
1817
@use_kwargs(UserSchema())
1918
def use_kwargs_without_partial(**kwargs):
20-
print(kwargs)
2119
return jsonify({k: v or None for k, v in kwargs.items()})

0 commit comments

Comments
 (0)