youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 8af4ed7b4fb20190ec72e9ab6347e99deabe9bce
parent 743b28ce1155df348bbb828fcb316d57c8704328
Author: Philipp Hagemeister <phihag@phihag.de>
Date:   Thu, 29 Nov 2012 16:35:57 +0100

Fix 2.6 nosetests

Diffstat:
Mtest/gentests.py | 5+++--
Mtest/test_download.py | 5+++--
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/gentests.py b/test/gentests.py @@ -52,13 +52,14 @@ try: except AttributeError: # Python 2.6 def _skip_unless(cond, reason='No reason given'): def resfunc(f): - def wfunc(*args, **kwargs): + # Start the function name with test to appease nosetests-2.6 + def test_wfunc(*args, **kwargs): if cond: return f(*args, **kwargs) else: print('Skipped test') return - return wfunc + return test_wfunc return resfunc _skip = lambda *args, **kwargs: _skip_unless(False, *args, **kwargs) diff --git a/test/test_download.py b/test/test_download.py @@ -38,13 +38,14 @@ try: except AttributeError: # Python 2.6 def _skip_unless(cond, reason='No reason given'): def resfunc(f): - def wfunc(*args, **kwargs): + # Start the function name with test to appease nosetests-2.6 + def test_wfunc(*args, **kwargs): if cond: return f(*args, **kwargs) else: print('Skipped test') return - return wfunc + return test_wfunc return resfunc _skip = lambda *args, **kwargs: _skip_unless(False, *args, **kwargs)