1
mirror of https://github.com/streamlink/streamlink synced 2024-09-11 05:57:52 +02:00

tests: Python 2.6's unittest module is terrible.

This commit is contained in:
Christopher Rosell 2014-03-29 00:34:18 +01:00
parent 5ebf5af093
commit cd1bf03133

View File

@ -8,12 +8,13 @@ class TestPluginAPIHTTPSession(unittest.TestCase):
def test_read_timeout(self):
session = HTTPSession()
with self.assertRaises(PluginError):
def stream_data():
res = session.get("http://httpbin.org/delay/6",
timeout=3, stream=True)
next(res.iter_content(8192))
self.assertRaises(PluginError, stream_data)
if __name__ == "__main__":
unittest.main()