Commits

Christian Heimes committed d8832e6

proxy trick doesn't work on Windows

  • Participants
  • Parent commits df3561f

Comments (0)

Files changed (2)

 
 *Release date: ??-Feb-2013*
 
+- Proxy trick doesn't work on Windows
+
 
 defusedexpat 0.2
 ----------------
     def test_sax_external_entity(self):
         try:
             defusedexpat.unmonkey_patch()
-            # IOError caused by proxy settings
-            self.assertRaises(IOError, self.parse_sax, self.xml_external)
+            # IOError caused by proxy settings, works only on POSIX
+            if os.name == "posix":
+                self.assertRaises(IOError, self.parse_sax, self.xml_external)
         finally:
             defusedexpat.monkey_patch()
         value = self.parse_sax(self.xml_external)
             defusedexpat.unmonkey_patch()
             # pulldom does DTD retrieval
             dom = pulldom.parse(self.xml_dtd)
-            self.assertRaises(IOError, list, dom)
+            if os.name == "posix":
+                self.assertRaises(IOError, list, dom)
             # and loads external entities by default
             dom = pulldom.parse(self.xml_external)
-            self.assertRaises(IOError, list, dom)
+            if os.name == "posix":
+                self.assertRaises(IOError, list, dom)
         finally:
             defusedexpat.monkey_patch()