Skip zoo archive tests on Travis.
This commit is contained in:
parent
165411a54a
commit
0385ad63b5
|
@ -87,3 +87,15 @@ def has_codec (program, codec):
|
|||
if patoolib.program_supports_compression(program, codec):
|
||||
return True
|
||||
return patoolib.util.find_program(codec)
|
||||
|
||||
|
||||
def skip_on_travis():
|
||||
"""Skip test if TRAVIS build environment is detected."""
|
||||
def check_func(func):
|
||||
def newfunc(*args, **kwargs):
|
||||
if "TRAVIS" in os.environ:
|
||||
raise pytest.skip("Skip on TRAVIS CI build.")
|
||||
return func(*args, **kwargs)
|
||||
setattr(newfunc, fnameattr, getattr(func, fnameattr))
|
||||
return newfunc
|
||||
return check_func
|
||||
|
|
|
@ -14,18 +14,21 @@
|
|||
# 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, Content
|
||||
from .. import needs_program
|
||||
from .. import needs_program, skip_on_travis
|
||||
|
||||
class TestZoo (ArchiveTest):
|
||||
|
||||
program = 'zoo'
|
||||
|
||||
# On a Travis CI build the test fails.
|
||||
@skip_on_travis()
|
||||
@needs_program(program)
|
||||
def test_zoo(self):
|
||||
self.archive_commands('t.zoo', check=Content.Multifile)
|
||||
|
||||
# fails on Travis build - disable for now
|
||||
#@needs_program('file')
|
||||
#@needs_program(program)
|
||||
#def test_zoo_file(self):
|
||||
# self.archive_commands('t.zoo.foo', skip_create=True, check=Content.Multifile)
|
||||
# On a Travis CI build the test fails.
|
||||
@skip_on_travis()
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
def test_zoo_file(self):
|
||||
self.archive_commands('t.zoo.foo', skip_create=True, check=Content.Multifile)
|
||||
|
|
Loading…
Reference in New Issue