From a7e6a665805565d4fe584174f7827b8254817b77 Mon Sep 17 00:00:00 2001
From: Antoine Lambert <anlambert@softwareheritage.org>
Date: Mon, 17 Feb 2025 16:04:15 +0100
Subject: [PATCH] tests: Remove no longer needed pytest custom marker named fs

This was used at the time we were building debian packages for
swh components but we no longer do that.
---
 swh/loader/core/tests/test_utils.py        | 10 ----------
 swh/loader/package/cran/tests/test_cran.py |  2 --
 swh/loader/package/pypi/tests/test_pypi.py |  2 --
 3 files changed, 14 deletions(-)

diff --git a/swh/loader/core/tests/test_utils.py b/swh/loader/core/tests/test_utils.py
index 8f9a8224..51e935d1 100644
--- a/swh/loader/core/tests/test_utils.py
+++ b/swh/loader/core/tests/test_utils.py
@@ -224,7 +224,6 @@ def test_version_generation():
     ), "Make sure swh.loader.core is installed (e.g. pip install -e .)"
 
 
-@pytest.mark.fs
 def test_download_fail_to_download(tmp_path, requests_mock):
     url = "https://pypi.org/pypi/arrow/json"
     status_code = 404
@@ -251,7 +250,6 @@ def _check_download_ok(url, dest, filename=_filename, hashes=_hashes):
     assert actual_filename == filename
 
 
-@pytest.mark.fs
 def test_download_ok(tmp_path, requests_mock):
     """Download without issue should provide filename and hashes"""
     url = f"https://pypi.org/pypi/requests/{_filename}"
@@ -259,7 +257,6 @@ def test_download_ok(tmp_path, requests_mock):
     _check_download_ok(url, dest=str(tmp_path))
 
 
-@pytest.mark.fs
 def test_download_ok_no_header(tmp_path, requests_mock):
     """Download without issue should provide filename and hashes"""
     url = f"https://pypi.org/pypi/requests/{_filename}"
@@ -267,7 +264,6 @@ def test_download_ok_no_header(tmp_path, requests_mock):
     _check_download_ok(url, dest=str(tmp_path))
 
 
-@pytest.mark.fs
 def test_download_ok_with_hashes(tmp_path, requests_mock):
     """Download without issue should provide filename and hashes"""
     url = f"https://pypi.org/pypi/requests/{_filename}"
@@ -282,7 +278,6 @@ def test_download_ok_with_hashes(tmp_path, requests_mock):
     _check_download_ok(url, dest=str(tmp_path), hashes=good)
 
 
-@pytest.mark.fs
 def test_download_fail_hashes_mismatch(tmp_path, requests_mock):
     """Mismatch hash after download should raise"""
     url = f"https://pypi.org/pypi/requests/{_filename}"
@@ -309,7 +304,6 @@ def test_download_fail_hashes_mismatch(tmp_path, requests_mock):
             download(url, dest=str(tmp_path), hashes=expected_hashes)
 
 
-@pytest.mark.fs
 def test_ftp_download_ok(tmp_path, mocker):
     """Download without issue should provide filename and hashes"""
     url = f"ftp://pypi.org/pypi/requests/{_filename}"
@@ -323,7 +317,6 @@ def test_ftp_download_ok(tmp_path, mocker):
     _check_download_ok(url, dest=str(tmp_path))
 
 
-@pytest.mark.fs
 def test_ftp_download_ko(tmp_path, mocker):
     """Download without issue should provide filename and hashes"""
     filename = "requests-0.0.1.tar.gz"
@@ -335,7 +328,6 @@ def test_ftp_download_ko(tmp_path, mocker):
         download(url, dest=str(tmp_path))
 
 
-@pytest.mark.fs
 def test_download_with_redirection(tmp_path, requests_mock):
     """Download with redirection should use the targeted URL to extract filename"""
     url = "https://example.org/project/requests/download"
@@ -360,7 +352,6 @@ def test_download_extracting_filename_from_url(tmp_path, requests_mock):
     _check_download_ok(url, dest=str(tmp_path))
 
 
-@pytest.mark.fs
 @pytest.mark.parametrize(
     "filename", [f'"{_filename}"', _filename, '"filename with spaces.tar.gz"']
 )
@@ -381,7 +372,6 @@ def test_download_filename_from_content_disposition(tmp_path, requests_mock, fil
     _check_download_ok(url, dest=str(tmp_path), filename=filename.strip('"'))
 
 
-@pytest.mark.fs
 @pytest.mark.parametrize("filename", ['"archive école.tar.gz"', "archive_école.tgz"])
 def test_download_utf8_filename_from_content_disposition(
     tmp_path, requests_mock, filename
diff --git a/swh/loader/package/cran/tests/test_cran.py b/swh/loader/package/cran/tests/test_cran.py
index 4ec84971..859a7431 100644
--- a/swh/loader/package/cran/tests/test_cran.py
+++ b/swh/loader/package/cran/tests/test_cran.py
@@ -130,7 +130,6 @@ def test_cran_parse_date():
             assert actual_tstz == expected_tstz, date
 
 
-@pytest.mark.fs
 def test_cran_extract_intrinsic_metadata(tmp_path, datadir):
     """Parsing existing archive's PKG-INFO should yield results"""
     uncompressed_archive_path = str(tmp_path)
@@ -161,7 +160,6 @@ def test_cran_extract_intrinsic_metadata(tmp_path, datadir):
     assert actual_metadata == expected_metadata
 
 
-@pytest.mark.fs
 def test_cran_extract_intrinsic_metadata_failures(tmp_path):
     """Parsing inexistent path/archive/PKG-INFO yield None"""
     # inexistent first level path
diff --git a/swh/loader/package/pypi/tests/test_pypi.py b/swh/loader/package/pypi/tests/test_pypi.py
index 5e475859..0ff52cad 100644
--- a/swh/loader/package/pypi/tests/test_pypi.py
+++ b/swh/loader/package/pypi/tests/test_pypi.py
@@ -161,7 +161,6 @@ def test_pypi_api_url_with_slash():
     assert url == "https://pypi.org/pypi/requests/json"
 
 
-@pytest.mark.fs
 def test_pypi_extract_intrinsic_metadata(tmp_path, datadir):
     """Parsing existing archive's PKG-INFO should yield results"""
     uncompressed_archive_path = str(tmp_path)
@@ -185,7 +184,6 @@ def test_pypi_extract_intrinsic_metadata(tmp_path, datadir):
     assert actual_metadata == expected_metadata
 
 
-@pytest.mark.fs
 def test_pypi_extract_intrinsic_metadata_failures(tmp_path):
     """Parsing inexistent path/archive/PKG-INFO yield None"""
     tmp_path = str(tmp_path)  # py3.5 work around (PosixPath issue)
-- 
GitLab