From 47602fe32d8e449dcf2af341f386896f2843daf2 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sat, 15 Jan 2022 14:41:45 +0100 Subject: [PATCH] fix tests --- tests-requirements.txt | 2 +- tests.sh | 6 ++++-- tests/test_find.py | 3 ++- tests/test_ls.py | 3 ++- tests/test_rm.py | 3 ++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tests-requirements.txt b/tests-requirements.txt index 2795de2..151a565 100644 --- a/tests-requirements.txt +++ b/tests-requirements.txt @@ -1,5 +1,5 @@ pycodestyle; python_version >= '3.0' pyflakes; python_version >= '3.0' -nose; python_version >= '3.0' +nose-py3; python_version >= '3.0' coverage; python_version >= '3.0' coveralls; python_version >= '3.0' diff --git a/tests.sh b/tests.sh index 178ba7e..4513102 100755 --- a/tests.sh +++ b/tests.sh @@ -13,8 +13,10 @@ pycodestyle tests/ pyflakes catcli/ pyflakes tests/ -PYTHONPATH=catcli python3 -m nose -s --with-coverage --cover-package=catcli -#PYTHONPATH=catcli python3 -m nose -s +nosebin="nosetests" + +PYTHONPATH=catcli ${nosebin} -s --with-coverage --cover-package=catcli +#PYTHONPATH=catcli ${nosebin} -s for t in ${cur}/tests-ng/*; do echo "running test \"`basename ${t}`\"" diff --git a/tests/test_find.py b/tests/test_find.py index cb5a584..5daff0a 100644 --- a/tests/test_find.py +++ b/tests/test_find.py @@ -24,7 +24,8 @@ class TestFind(unittest.TestCase): # create fake args args = {'': '7544G', '--script': True, '--verbose': True, '--parent': False, - '--directory': False, '--path': None} + '--directory': False, '--path': None, + '--format': 'native'} # try to find something found = cmd_find(args, noder, top) diff --git a/tests/test_ls.py b/tests/test_ls.py index 7b2061a..5446531 100644 --- a/tests/test_ls.py +++ b/tests/test_ls.py @@ -25,7 +25,8 @@ class TestWalking(unittest.TestCase): # create fake args args = {'': '', '--recursive': False, - '--verbose': True} + '--verbose': True, + '--format': 'native'} # list root args[''] = '' diff --git a/tests/test_rm.py b/tests/test_rm.py index 81f96ef..356bc62 100644 --- a/tests/test_rm.py +++ b/tests/test_rm.py @@ -25,7 +25,8 @@ class TestRm(unittest.TestCase): # create fake args dict args = {'': '', '--recursive': False, - '--verbose': True} + '--verbose': True, + '--format': 'native'} # list files and make sure there are children args[''] = ''