test_pty: skip on Windows where pty module is not available
diff --git a/test/test_pty.py b/test/test_pty.py
index 938e24f..fd5f7e0 100644
--- a/test/test_pty.py
+++ b/test/test_pty.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#
# This file is part of pySerial - Cross platform serial port support for Python
-# (C) 2015 Chris Liechti <cliechti@gmx.net>
+# (C) 2016 Chris Liechti <cliechti@gmx.net>
#
# SPDX-License-Identifier: BSD-3-Clause
"""
@@ -10,11 +10,16 @@
import os
import sys
-import pty
+
+try:
+ import pty
+except ImportError:
+ pty = None
import unittest
import serial
+@unittest.skipIf(pty is None, "pty module not supported on platform")
class Test_Pty_Serial_Open(unittest.TestCase):
"""Test PTY serial open"""