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 28 29 30 31 32 33 34 35 36 37 38 39
|
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Sat, 28 Jan 2017 20:50:33 +0100
Subject: Skip tests with unattainable dependencies in Python3.
Both libmproxy and sgmllib are not available for Python3. libmproxy might be in
the future.
---
tests/test_linkextractors_deprecated.py | 4 ++++
tests/test_proxy_connect.py | 3 +++
2 files changed, 7 insertions(+)
diff --git a/tests/test_linkextractors_deprecated.py b/tests/test_linkextractors_deprecated.py
index 1366971..ee8794c 100644
--- a/tests/test_linkextractors_deprecated.py
+++ b/tests/test_linkextractors_deprecated.py
@@ -1,5 +1,9 @@
# -*- coding: utf-8 -*-
import unittest
+
+import pytest
+pytest.importorskip('sgmllib')
+
from scrapy.linkextractors.regex import RegexLinkExtractor
from scrapy.http import HtmlResponse
from scrapy.link import Link
diff --git a/tests/test_proxy_connect.py b/tests/test_proxy_connect.py
index 6213a51..7e44817 100644
--- a/tests/test_proxy_connect.py
+++ b/tests/test_proxy_connect.py
@@ -2,6 +2,9 @@ import json
import os
import time
+import pytest
+pytest.importorskip('libmproxy')
+
from threading import Thread
from libmproxy import controller, proxy
from netlib import http_auth
|