Use new test mode functionality.
This commit is contained in:
parent
fe25ac8e03
commit
7d0d0f9601
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
from . import ArchiveTest
|
||||
from . import ArchiveTest, Content
|
||||
from .. import needs_program, needs_os
|
||||
|
||||
class TestAr (ArchiveTest):
|
||||
|
@ -23,7 +23,7 @@ class TestAr (ArchiveTest):
|
|||
@needs_os('posix')
|
||||
@needs_program(program)
|
||||
def test_ar(self):
|
||||
self.archive_commands('t.txt.a', singlefile=True)
|
||||
self.archive_commands('t.txt.a', check=Content.Singlefile)
|
||||
|
||||
@needs_os('posix')
|
||||
@needs_program('file')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
from . import ArchiveTest
|
||||
from . import ArchiveTest, Content
|
||||
from .. import needs_program
|
||||
|
||||
class TestArc(ArchiveTest):
|
||||
|
@ -22,10 +22,10 @@ class TestArc(ArchiveTest):
|
|||
|
||||
@needs_program(program)
|
||||
def test_arc(self):
|
||||
self.archive_commands('t.arc', singlefile=True)
|
||||
self.archive_commands('t.arc', check=Content.Multifile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
def test_arc_file(self):
|
||||
self.archive_commands('t.arc.foo', skip_create=True)
|
||||
self.archive_commands('t.arc.foo', check=Content.Multifile, skip_create=True)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestBzip2 (ArchiveTest):
|
|||
def test_bzip2 (self):
|
||||
self.archive_extract('t.txt.bz2', check=Content.Singlefile)
|
||||
self.archive_test('t.txt.bz2')
|
||||
self.archive_create('t.txt.bz2', singlefile=True)
|
||||
self.archive_create('t.txt.bz2', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestClzip (ArchiveTest):
|
|||
def test_clzip(self):
|
||||
self.archive_test('t.txt.lz')
|
||||
self.archive_extract('t.txt.lz', check=Content.Singlefile)
|
||||
self.archive_create('t.txt.lz', singlefile=True)
|
||||
self.archive_create('t.txt.lz', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
from . import ArchiveTest
|
||||
from . import ArchiveTest, Content
|
||||
from .. import needs_program
|
||||
|
||||
class TestCompress (ArchiveTest):
|
||||
|
@ -22,5 +22,4 @@ class TestCompress (ArchiveTest):
|
|||
|
||||
@needs_program(program)
|
||||
def test_compress (self):
|
||||
self.archive_create('t.txt.Z', singlefile=True)
|
||||
|
||||
self.archive_create('t.txt.Z', check=Content.Singlefile)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestFlac (ArchiveTest):
|
|||
def test_flac(self):
|
||||
self.archive_extract('t.flac', check=None)
|
||||
self.archive_test('t.flac')
|
||||
self.archive_create('t.flac', srcfile="t.wav")
|
||||
self.archive_create('t.flac', srcfiles=("t.wav",))
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -22,7 +22,7 @@ class TestGzip (ArchiveTest):
|
|||
|
||||
@needs_program(program)
|
||||
def test_gzip (self):
|
||||
self.archive_commands('t.txt.gz', singlefile=True)
|
||||
self.archive_commands('t.txt.gz', check=Content.Singlefile)
|
||||
self.archive_extract('t.txt.Z', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestLbzip2 (ArchiveTest):
|
|||
def test_lbzip2 (self):
|
||||
self.archive_extract('t.txt.bz2', check=Content.Singlefile)
|
||||
self.archive_test('t.txt.bz2')
|
||||
self.archive_create('t.txt.bz2', singlefile=True)
|
||||
self.archive_create('t.txt.bz2', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestLzip (ArchiveTest):
|
|||
def test_lzip(self):
|
||||
self.archive_test('t.txt.lz')
|
||||
self.archive_extract('t.txt.lz', check=Content.Singlefile)
|
||||
self.archive_create('t.txt.lz', singlefile=True)
|
||||
self.archive_create('t.txt.lz', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestLzma (ArchiveTest):
|
|||
def test_lzma(self):
|
||||
self.archive_test('t.txt.lzma')
|
||||
self.archive_extract('t.txt.lzma', check=Content.Singlefile)
|
||||
self.archive_create('t.txt.lzma', singlefile=True)
|
||||
self.archive_create('t.txt.lzma', check=Content.Singlefile)
|
||||
|
||||
# file(1) does not recognize .lzma files
|
||||
#@needs_program('file')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestMac (ArchiveTest):
|
|||
def test_mac(self):
|
||||
self.archive_extract('t.ape', check=None)
|
||||
self.archive_test('t.ape')
|
||||
self.archive_create('t.ape', srcfile="t.wav")
|
||||
self.archive_create('t.ape', srcfiles=("t.wav",))
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
from . import ArchiveTest
|
||||
from . import ArchiveTest, Content
|
||||
from .. import needs_program
|
||||
|
||||
class TestNomarch(ArchiveTest):
|
||||
|
@ -24,12 +24,12 @@ class TestNomarch(ArchiveTest):
|
|||
def test_nomarch(self):
|
||||
self.archive_test('t.arc')
|
||||
self.archive_list('t.arc')
|
||||
self.archive_extract('t.arc')
|
||||
self.archive_extract('t.arc', check=Content.Multifile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
def test_nomarch_file(self):
|
||||
self.archive_test('t.arc.foo')
|
||||
self.archive_list('t.arc.foo')
|
||||
self.archive_extract('t.arc.foo')
|
||||
self.archive_extract('t.arc.foo', check=Content.Multifile)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestPbzip2 (ArchiveTest):
|
|||
def test_pbzip2 (self):
|
||||
self.archive_extract('t.txt.bz2', check=Content.Singlefile)
|
||||
self.archive_test('t.txt.bz2')
|
||||
self.archive_create('t.txt.bz2', singlefile=True)
|
||||
self.archive_create('t.txt.bz2', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestPdlzip (ArchiveTest):
|
|||
def test_pdlzip(self):
|
||||
self.archive_test('t.txt.lz')
|
||||
self.archive_extract('t.txt.lz', check=Content.Singlefile)
|
||||
self.archive_create('t.txt.lz', singlefile=True)
|
||||
self.archive_create('t.txt.lz', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
from . import ArchiveTest
|
||||
from . import ArchiveTest, Content
|
||||
from .. import needs_program
|
||||
|
||||
class TestPigz (ArchiveTest):
|
||||
|
@ -22,10 +22,10 @@ class TestPigz (ArchiveTest):
|
|||
|
||||
@needs_program(program)
|
||||
def test_pigz (self):
|
||||
self.archive_commands('t.txt.gz', singlefile=True)
|
||||
self.archive_commands('t.txt.gz', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
def test_pigz_file (self):
|
||||
self.archive_commands('t.txt.gz.foo', singlefile=True,
|
||||
self.archive_commands('t.txt.gz.foo', check=Content.Singlefile,
|
||||
skip_create=True, skip_test=True)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestPlzip (ArchiveTest):
|
|||
def test_plzip(self):
|
||||
self.archive_test('t.txt.lz')
|
||||
self.archive_extract('t.txt.lz', check=Content.Singlefile)
|
||||
self.archive_create('t.txt.lz', singlefile=True)
|
||||
self.archive_create('t.txt.lz', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestPybz2 (ArchiveTest):
|
|||
def test_py_bz2 (self):
|
||||
self.archive_extract('t.txt.bz2', check=Content.Singlefile)
|
||||
# bzip2 is used to test the created archive
|
||||
self.archive_create('t.txt.bz2', singlefile=True)
|
||||
self.archive_create('t.txt.bz2', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
def test_py_bz2_file (self):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,7 +24,7 @@ class TestPygzip (ArchiveTest):
|
|||
def test_py_gzip (self):
|
||||
self.archive_extract('t.txt.gz', check=Content.Singlefile)
|
||||
# gzip is used to test the created archive
|
||||
self.archive_create('t.txt.gz', singlefile=True)
|
||||
self.archive_create('t.txt.gz', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
def test_py_gzip_file (self):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
from . import ArchiveTest
|
||||
from . import ArchiveTest, Content
|
||||
from .. import needs_program
|
||||
|
||||
class TestRzip (ArchiveTest):
|
||||
|
@ -23,7 +23,7 @@ class TestRzip (ArchiveTest):
|
|||
@needs_program(program)
|
||||
def test_rzip(self):
|
||||
self.archive_extract('t.txt.rz')
|
||||
self.archive_create('t.txt.rz', singlefile=True)
|
||||
self.archive_create('t.txt.rz', check=Content.Singlefile)
|
||||
|
||||
@needs_program(program)
|
||||
def test_rzip_file(self):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
from . import ArchiveTest
|
||||
from . import ArchiveTest, Content
|
||||
from .. import needs_program
|
||||
|
||||
class TestShar (ArchiveTest):
|
||||
|
@ -23,5 +23,5 @@ class TestShar (ArchiveTest):
|
|||
@needs_program(program)
|
||||
@needs_program('unshar')
|
||||
def test_shar(self):
|
||||
self.archive_create('t.shar', singlefile=True)
|
||||
self.archive_create('t.shar', check=Content.Singlefile)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -23,7 +23,7 @@ class TestShorten (ArchiveTest):
|
|||
@needs_program(program)
|
||||
def test_shorten(self):
|
||||
self.archive_extract('t.shn', check=None)
|
||||
self.archive_create('t.shn', srcfile="t.wav")
|
||||
self.archive_create('t.shn', srcfiles=("t.wav",))
|
||||
|
||||
# file(1) does not recognize .shn files
|
||||
#@needs_program('file')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -22,7 +22,7 @@ class TestXz (ArchiveTest):
|
|||
|
||||
@needs_program(program)
|
||||
def test_xz(self):
|
||||
self.archive_commands('t.txt.xz', singlefile=True)
|
||||
self.archive_commands('t.txt.xz', check=Content.Singlefile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2010-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2010-2013 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
from . import ArchiveTest
|
||||
from . import ArchiveTest, Content
|
||||
from .. import needs_program
|
||||
|
||||
class TestZoo (ArchiveTest):
|
||||
|
@ -22,9 +22,9 @@ class TestZoo (ArchiveTest):
|
|||
|
||||
@needs_program(program)
|
||||
def test_zoo(self):
|
||||
self.archive_commands('t.zoo', singlefile=True, check=None)
|
||||
self.archive_commands('t.zoo', check=Content.Multifile)
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
def test_zoo_file(self):
|
||||
self.archive_commands('t.zoo.foo', skip_create=True, check=None, singlefile=True)
|
||||
self.archive_commands('t.zoo.foo', skip_create=True, check=Content.Multifile)
|
||||
|
|
Loading…
Reference in New Issue