From 825f959d789a01665ea95ecde7387c9908c7ce54 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 17 May 2012 11:31:00 +0200 Subject: [PATCH] Fix test for monkeys audio compressor. --- tests/__init__.py | 8 +++++--- tests/test_archives.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 378aaea..dd1e0eb 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -74,11 +74,13 @@ class ArchiveTest (unittest.TestCase): def archive_create (self, archive, srcfile=None, singlefile=False, format=None, compression=None): """Test archive creation.""" - if not srcfile: + # determine filename which is added to the archive + if srcfile is None: if singlefile: - srcfile = os.path.join(datadir, 'foo .txt') + srcfile = 'foo .txt' else: - srcfile = os.path.join(datadir, 'foo dir') + srcfile = 'foo dir' + srcfile = os.path.join(datadir, srcfile) # The format and compression arguments are needed for creating # archives with unusual file extensions. kwargs = dict( diff --git a/tests/test_archives.py b/tests/test_archives.py index 06cbde1..7d01c4b 100644 --- a/tests/test_archives.py +++ b/tests/test_archives.py @@ -445,4 +445,4 @@ class TestArchives (ArchiveTest): self.program = 'mac' self.archive_extract('t.ape') self.archive_test('t.ape') - self.archive_create('t.ape', singlefile=True) + self.archive_create('t.ape', srcfile="t.wav")