mirror of https://github.com/scrapy/scrapy.git
Increase coverage of version command
This commit is contained in:
parent
54f9837804
commit
43fc2f23b8
|
|
@ -14,4 +14,16 @@ class VersionTest(ProcessTest, unittest.TestCase):
|
|||
def test_output(self):
|
||||
encoding = getattr(sys.stdout, 'encoding') or 'utf-8'
|
||||
_, out, _ = yield self.execute([])
|
||||
self.assertEqual(out.strip().decode(encoding), "Scrapy %s" % scrapy.__version__)
|
||||
self.assertEqual(
|
||||
out.strip().decode(encoding),
|
||||
"Scrapy %s" % scrapy.__version__,
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_verbose_output(self):
|
||||
encoding = getattr(sys.stdout, 'encoding') or 'utf-8'
|
||||
_, out, _ = yield self.execute(['-v'])
|
||||
headers = [l.partition(":")[0].strip()
|
||||
for l in out.strip().decode(encoding).splitlines()]
|
||||
self.assertEqual(headers, ['Scrapy', 'lxml', 'libxml2', 'Twisted',
|
||||
'Python', 'pyOpenSSL', 'Platform'])
|
||||
|
|
|
|||
Loading…
Reference in New Issue