Skip to content

Commit 6c7c1b7

Browse files
committed
don't test server scrapping with all runtimes (avoid errors)
1 parent 06aecdc commit 6c7c1b7

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

tests/cte/test_servers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import sys
12
from pathlib import Path
23

4+
import pytest
5+
36
from nfelib.cte.client.v4_0.servers_scraper import main
47

58
OUTPUT_FILE = Path("nfelib/cte/client/v4_0/servers.py")
@@ -9,6 +12,10 @@ def read_current_servers():
912
return OUTPUT_FILE.read_text(encoding="utf-8") if OUTPUT_FILE.exists() else ""
1013

1114

15+
@pytest.mark.skipif(
16+
sys.version_info.major != 3 or sys.version_info.minor != 11,
17+
reason="This test is intended to run only on Python 3.11",
18+
)
1219
def test_scraper():
1320
old_content = read_current_servers()
1421
main()

tests/mdfe/test_servers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import sys
12
from pathlib import Path
23

4+
import pytest
5+
36
from nfelib.mdfe.client.v3_0.servers_scraper import main
47

58
OUTPUT_FILE = Path("nfelib/mdfe/client/v3_0/servers.py")
@@ -9,6 +12,10 @@ def read_current_servers():
912
return OUTPUT_FILE.read_text(encoding="utf-8") if OUTPUT_FILE.exists() else ""
1013

1114

15+
@pytest.mark.skipif(
16+
sys.version_info.major != 3 or sys.version_info.minor != 11,
17+
reason="This test is intended to run only on Python 3.11",
18+
)
1219
def test_scraper():
1320
old_content = read_current_servers()
1421
main()

tests/nfe/test_servers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import sys
12
from pathlib import Path
23

4+
import pytest
5+
36
from nfelib.nfe.client.v4_0.servers_scraper import main
47

58
OUTPUT_FILE = Path("nfelib/nfe/client/v4_0/servers.py")
@@ -9,6 +12,10 @@ def read_current_servers():
912
return OUTPUT_FILE.read_text(encoding="utf-8") if OUTPUT_FILE.exists() else ""
1013

1114

15+
@pytest.mark.skipif(
16+
sys.version_info.major != 3 or sys.version_info.minor != 11,
17+
reason="This test is intended to run only on Python 3.11",
18+
)
1219
def test_scraper():
1320
old_content = read_current_servers()
1421
main()

0 commit comments

Comments
 (0)