Simulate the echo program with print statement.

This commit is contained in:
Bastian Kleineidam 2012-05-11 23:09:52 +02:00
parent 547bd75fd6
commit 8304658d4e
3 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""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

View File

@ -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')

View File

@ -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')