summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2016-05-30 10:19:36 +0200
committerOndrej Holy <oholy@redhat.com>2016-05-30 12:36:55 +0200
commit426f1d526579ce32d57f95eb3e7578cabcbd1fda (patch)
tree61b043ad1fb13d78ee5c772a33e13059e4ad3577 /test
parent1e5662bba4d15a256053a478c3bf56ac60848021 (diff)
downloadgvfs-426f1d526579ce32d57f95eb3e7578cabcbd1fda.tar.gz
test: Skip ftp tests if twistd is not installed
Currently ftp tests fail if twistd is not installed with the following error: FileNotFoundError: [Errno 2] No such file or directory: 'twistd' Sftp tests should be skipped if twistd is not installed to avoid test suite failures. https://bugzilla.gnome.org/show_bug.cgi?id=734370
Diffstat (limited to 'test')
-rwxr-xr-xtest/gvfs-test2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/gvfs-test b/test/gvfs-test
index 86ed6115..d9c45939 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -50,6 +50,7 @@ except ImportError:
# umockdev environment for gphoto/MTP tests
umockdev_testbed = None
+have_twistd = subprocess.call(['which', 'twistd'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0
def find_alternative(cmds):
'''Find command in cmds array and return the found alternative'''
@@ -564,6 +565,7 @@ Subsystem sftp %(sftp_server)s
self.unmount(uri)
+@unittest.skipUnless(have_twistd, 'Twisted twistd not installed')
class Ftp(GvfsTestCase):
def setUp(self):
'''Launch FTP server'''