Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

remove scrapy.utils.testsite from PY3 ignores

Mikhail Korobov9316b2317bdf
diff --git a/conftest.py b/conftest.py
index 5829f2952..f9ca3ab93 100644
--- a/conftest.py
+++ b/conftest.py
@@ -8,6 +8,7 @@ def _py_files(folder):
collect_ignore = [
+ # deprecated or moved modules
"scrapy/conf.py",
"scrapy/stats.py",
"scrapy/project.py",
@@ -19,6 +20,10 @@ collect_ignore = [
"scrapy/command.py",
"scrapy/linkextractor.py",
"scrapy/spider.py",
+
+ # not a test, but looks like a test
+ "scrapy/utils/testsite.py",
+
] + _py_files("scrapy/contrib") + _py_files("scrapy/contrib_exp")
diff --git a/scrapy/utils/testsite.py b/scrapy/utils/testsite.py
index 7d4d4b2bd..01508bdb4 100644
--- a/scrapy/utils/testsite.py
+++ b/scrapy/utils/testsite.py
@@ -4,6 +4,7 @@ from six.moves.urllib.parse import urljoin
from twisted.internet import reactor
from twisted.web import server, resource, static, util
+
class SiteTest(object):
def setUp(self):
@@ -18,6 +19,7 @@ class SiteTest(object):
def url(self, path):
return urljoin(self.baseurl, path)
+
def test_site():
r = resource.Resource()
r.putChild("text", static.Data("Works", "text/plain"))
diff --git a/tests/py3-ignores.txt b/tests/py3-ignores.txt
index c51bc5981..afebb0b31 100644
--- a/tests/py3-ignores.txt
+++ b/tests/py3-ignores.txt
@@ -52,8 +52,6 @@ scrapy/xlib/tx/endpoints.py
scrapy/xlib/tx/client.py
scrapy/xlib/tx/_newclient.py
scrapy/xlib/tx/__init__.py
-scrapy/xlib/tx/__init__.py
-scrapy/utils/testsite.py
scrapy/http/cookies.py
scrapy/core/downloader/handlers/s3.py
scrapy/core/downloader/handlers/http11.py