Skip to content

Commit d9aec67

Browse files
committed
Fix attrib decorator (fixes bpython#553)
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent dc0f294 commit d9aec67

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

bpython/test/test_args.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
try:
1515
from nose.plugins.attrib import attr
1616
except ImportError:
17-
def attr(func, *args, **kwargs):
18-
return func
17+
def attr(*args, **kwargs):
18+
def identity(func):
19+
return func
20+
return identity
1921

2022

2123
@attr(speed='slow')

bpython/test/test_crashers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ class TrialTestCase(object):
2727
try:
2828
from nose.plugins.attrib import attr
2929
except ImportError:
30-
def attr(func, *args, **kwargs):
31-
return func
30+
def attr(*args, **kwargs):
31+
def identity(func):
32+
return func
33+
return identity
3234

3335
TEST_CONFIG = os.path.join(os.path.dirname(__file__), "test.config")
3436

0 commit comments

Comments
 (0)