Skip to content

Commit

Permalink
Skip test when ftp.gnu.org not available
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Jan 1, 2024
1 parent 242f75c commit 6821109
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions test/unit/files/test_ftp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import os

import pytest
from fs.errors import RemoteConnectionError

from ._util import (
assert_realizes_contains,
configured_file_sources,
Expand All @@ -19,12 +22,15 @@ def test_file_source_ftp_specific():
assert file_source_pair.path == test_url
assert file_source_pair.file_source.id == "test1"

assert_realizes_contains(
file_sources,
test_url,
"This is ftp.gnu.org, the FTP server of the the GNU project.",
user_context=user_context,
)
try:
assert_realizes_contains(
file_sources,
test_url,
"This is ftp.gnu.org, the FTP server of the the GNU project.",
user_context=user_context,
)
except RemoteConnectionError:
pytest.skip("ftp.gnu.org not available")


def test_file_source_ftp_generic():
Expand Down

0 comments on commit 6821109

Please sign in to comment.