File: 1003_skip_network_tests.patch

package info (click to toggle)
vdirsyncer 0.19.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 980 kB
  • sloc: python: 7,388; makefile: 204; sh: 66
file content (27 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Skip network test unless EXTENDED_TESTING is set in environment
Author: Filip Pytloun <filip@pytloun.cz>
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: no
Last-Update: 2021-12-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/tests/system/utils/test_main.py
+++ b/tests/system/utils/test_main.py
@@ -1,6 +1,7 @@
 from __future__ import annotations
 
 import logging
+import os
 
 import aiohttp
 import click_log
@@ -26,6 +27,9 @@
     assert not required
 
 
+@pytest.mark.skipif(
+    'EXTENDED_TESTING' not in os.environ, reason="test requires network access"
+)
 @pytest.mark.asyncio
 async def test_request_ssl():
     async with aiohttp.ClientSession() as session: