Fix tests.

This commit is contained in:
Bastian Kleineidam 2012-05-24 23:26:26 +02:00
parent 216faeaf0e
commit 451f18a625
9 changed files with 20 additions and 20 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
tests/data/t.txt.xz.foo Normal file

Binary file not shown.

Binary file not shown.

View File

@ -182,36 +182,36 @@ class TestArchives (ArchiveTest):
@needs_program('bzip2') @needs_program('bzip2')
def test_bzip2 (self): def test_bzip2 (self):
self.program = 'bzip2' self.program = 'bzip2'
self.archive_extract('t.bz2.foo') self.archive_extract('t.txt.bz2.foo')
self.archive_test('t.bz2.foo') self.archive_test('t.txt.bz2.foo')
self.archive_create('t.bz2.foo', format="bzip2", singlefile=True) self.archive_create('t.txt.bz2.foo', format="bzip2", singlefile=True)
@needs_program('file') @needs_program('file')
def test_py_bz2 (self): def test_py_bz2 (self):
self.program = 'py_bz2' self.program = 'py_bz2'
self.archive_extract('t.bz2.foo') self.archive_extract('t.txt.bz2.foo')
self.archive_create('t.bz2.foo', format="bzip2", singlefile=True) self.archive_create('t.txt.bz2.foo', format="bzip2", singlefile=True)
@needs_program('file') @needs_program('file')
@needs_program('pbzip2') @needs_program('pbzip2')
def test_pbzip2 (self): def test_pbzip2 (self):
self.program = 'pbzip2' self.program = 'pbzip2'
self.archive_extract('t.bz2.foo') self.archive_extract('t.txt.bz2.foo')
self.archive_test('t.bz2.foo') self.archive_test('t.txt.bz2.foo')
self.archive_create('t.bz2.foo', format="bzip2", singlefile=True) self.archive_create('t.txt.bz2.foo', format="bzip2", singlefile=True)
@needs_program('file') @needs_program('file')
@needs_program('lbzip2') @needs_program('lbzip2')
def test_lbzip2 (self): def test_lbzip2 (self):
self.program = 'lbzip2' self.program = 'lbzip2'
self.archive_extract('t.bz2.foo') self.archive_extract('t.txt.bz2.foo')
self.archive_test('t.bz2.foo') self.archive_test('t.txt.bz2.foo')
self.archive_create('t.bz2.foo', format="bzip2", singlefile=True) self.archive_create('t.txt.bz2.foo', format="bzip2", singlefile=True)
@needs_program('file') @needs_program('file')
def test_py_echo (self): def test_py_echo (self):
self.program = 'py_echo' self.program = 'py_echo'
self.archive_list('t.bz2.foo') self.archive_list('t.txt.bz2.foo')
self.archive_list('t.txt.Z.foo') self.archive_list('t.txt.Z.foo')
# file(1) does not recognize .lzma files # file(1) does not recognize .lzma files
#self.archive_list('t.lzma.foo') #self.archive_list('t.lzma.foo')

View File

@ -49,16 +49,16 @@ class TestMime (unittest.TestCase):
self.mime_test_file("t.7z.foo", "application/x-7z-compressed", None) self.mime_test_file("t.7z.foo", "application/x-7z-compressed", None)
self.mime_test_file("t.arj", "application/x-arj", None) self.mime_test_file("t.arj", "application/x-arj", None)
self.mime_test_file("t.arj.foo", "application/x-arj", None) self.mime_test_file("t.arj.foo", "application/x-arj", None)
self.mime_test_file("t .bz2", "application/x-bzip2", None) self.mime_test_file("t.txt.bz2", "application/x-bzip2", None)
self.mime_test_file("t.bz2.foo", "application/x-bzip2", None) self.mime_test_file("t.txt.bz2.foo", "application/x-bzip2", None)
self.mime_test_file("t.cab", "application/vnd.ms-cab-compressed", None) self.mime_test_file("t.cab", "application/vnd.ms-cab-compressed", None)
self.mime_test_file("t.cab.foo", "application/vnd.ms-cab-compressed", None) self.mime_test_file("t.cab.foo", "application/vnd.ms-cab-compressed", None)
self.mime_test_file("t.cpio", "application/x-cpio", None) self.mime_test_file("t.cpio", "application/x-cpio", None)
self.mime_test_file("t.cpio.foo", "application/x-cpio", None) self.mime_test_file("t.cpio.foo", "application/x-cpio", None)
self.mime_test_file("t.deb", "application/x-debian-package", None) self.mime_test_file("t.deb", "application/x-debian-package", None)
self.mime_test_file("t.deb.foo", "application/x-debian-package", None) self.mime_test_file("t.deb.foo", "application/x-debian-package", None)
self.mime_test_file("t.gz", "application/x-gzip", None) self.mime_test_file("t.txt.gz", "application/x-gzip", None)
self.mime_test_file("t.gz.foo", "application/x-gzip", None) self.mime_test_file("t.txt.gz.foo", "application/x-gzip", None)
self.mime_test_file("t.jar", "application/zip", None) self.mime_test_file("t.jar", "application/zip", None)
self.mime_test_file("t.jar.foo", "application/zip", None) self.mime_test_file("t.jar.foo", "application/zip", None)
# file(1) does not recognize .lzma files # file(1) does not recognize .lzma files
@ -87,10 +87,10 @@ class TestMime (unittest.TestCase):
#self.mime_test_file("t.tar.lzma.foo", "application/x-tar", "lzma") #self.mime_test_file("t.tar.lzma.foo", "application/x-tar", "lzma")
self.mime_test_file("t.txt.gz", "application/x-gzip", None) self.mime_test_file("t.txt.gz", "application/x-gzip", None)
self.mime_test_file("t.txt.gz.foo", "application/x-gzip", None) self.mime_test_file("t.txt.gz.foo", "application/x-gzip", None)
self.mime_test_file("t .xz", "application/x-xz", None) self.mime_test_file("t.txt.xz", "application/x-xz", None)
self.mime_test_file("t.xz.foo", "application/x-xz", None) self.mime_test_file("t.txt.xz.foo", "application/x-xz", None)
self.mime_test_file("t.Z", "application/x-compress", None) self.mime_test_file("t.txt.Z", "application/x-compress", None)
self.mime_test_file("t.Z.foo", "application/x-compress", None) self.mime_test_file("t.txt.Z.foo", "application/x-compress", None)
self.mime_test_file("t.jar", "application/zip", None) self.mime_test_file("t.jar", "application/zip", None)
self.mime_test_file("t.jar.foo", "application/zip", None) self.mime_test_file("t.jar.foo", "application/zip", None)
self.mime_test_file("t.zip", "application/zip", None) self.mime_test_file("t.zip", "application/zip", None)