From 9bea616441256e07495c5e5fd34f6a6673e05c52 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 12 Jun 2016 10:39:19 +1200 Subject: [PATCH] Be stricter about handling connetcts in the pathoc test suite Attempt to clear a niggling Appveyor exception buggering up our CI. --- test/pathod/test_pathoc.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/pathod/test_pathoc.py b/test/pathod/test_pathoc.py index dc5011c0b..77d4721c6 100644 --- a/test/pathod/test_pathoc.py +++ b/test/pathod/test_pathoc.py @@ -83,7 +83,13 @@ class TestDaemon(PathocTestDaemon): def test_ssl_error(self): c = pathoc.Pathoc(("127.0.0.1", self.d.port), ssl=True, fp=None) - tutils.raises("ssl handshake", c.connect) + try: + with c.connect(): + pass + except Exception as e: + assert "SSL" in str(e) + else: + raise AssertionError("No exception raised.") def test_showssl(self): assert "certificate chain" not in self.tval(