From 8304658d4e022e2c702a7409427818188c674042 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Fri, 11 May 2012 23:09:52 +0200 Subject: [PATCH] Simulate the echo program with print statement. --- patoolib/programs/echo.py | 8 +++++--- tests/test_archives.py | 1 - tests/test_foo_archives.py | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/patoolib/programs/echo.py b/patoolib/programs/echo.py index 56a3cbb..2966cfb 100644 --- a/patoolib/programs/echo.py +++ b/patoolib/programs/echo.py @@ -13,7 +13,8 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -"""Archive commands for the echo program.""" +"""Archive commands for the echo program, simulated by the Python print +statement.""" from patoolib import util @@ -46,5 +47,6 @@ def list_rzip (archive, encoding, cmd, **kwargs): return stripext(cmd, archive) def stripext (cmd, archive): - """Echo the name without suffix.""" - return [cmd, util.stripext(archive)] + """Print the name without suffix.""" + print util.stripext(archive) + return None diff --git a/tests/test_archives.py b/tests/test_archives.py index 809af60..0e7902e 100644 --- a/tests/test_archives.py +++ b/tests/test_archives.py @@ -121,7 +121,6 @@ class TestArchives (ArchiveTest): self.archive_test('t .bz2') self.archive_create('t .bz2', singlefile=True) - @needs_program('echo') def test_echo (self): self.program = 'echo' self.archive_list('t .bz2') diff --git a/tests/test_foo_archives.py b/tests/test_foo_archives.py index d5ccb3e..25c5330 100644 --- a/tests/test_foo_archives.py +++ b/tests/test_foo_archives.py @@ -137,7 +137,6 @@ class TestArchives (ArchiveTest): self.archive_create('t.bz2.foo', format="bzip2", singlefile=True) @needs_program('file') - @needs_program('echo') def test_echo (self): self.program = 'echo' self.archive_list('t.bz2.foo')