@@ -357,6 +357,7 @@ def stop_server(self):
357
357
self .server .stop ()
358
358
self .server = None
359
359
360
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
360
361
def test_proxy_with_bad_password_raises_httperror (self ):
361
362
self .proxy_digest_handler .add_password (self .REALM , self .URL ,
362
363
self .USER , self .PASSWD + "bad" )
@@ -365,12 +366,14 @@ def test_proxy_with_bad_password_raises_httperror(self):
365
366
self .opener .open ,
366
367
self .URL )
367
368
369
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
368
370
def test_proxy_with_no_password_raises_httperror (self ):
369
371
self .digest_auth_handler .set_qop ("auth" )
370
372
self .assertRaises (urllib .error .HTTPError ,
371
373
self .opener .open ,
372
374
self .URL )
373
375
376
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
374
377
def test_proxy_qop_auth_works (self ):
375
378
self .proxy_digest_handler .add_password (self .REALM , self .URL ,
376
379
self .USER , self .PASSWD )
@@ -379,6 +382,7 @@ def test_proxy_qop_auth_works(self):
379
382
while result .read ():
380
383
pass
381
384
385
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
382
386
def test_proxy_qop_auth_int_works_or_throws_urlerror (self ):
383
387
self .proxy_digest_handler .add_password (self .REALM , self .URL ,
384
388
self .USER , self .PASSWD )
@@ -500,6 +504,7 @@ def start_https_server(self, responses=None, **kwargs):
500
504
handler .port = server .port
501
505
return handler
502
506
507
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
503
508
def test_redirection (self ):
504
509
expected_response = b"We got here..."
505
510
responses = [
@@ -513,6 +518,7 @@ def test_redirection(self):
513
518
self .assertEqual (data , expected_response )
514
519
self .assertEqual (handler .requests , ["/" , "/somewhere_else" ])
515
520
521
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
516
522
def test_chunked (self ):
517
523
expected_response = b"hello world"
518
524
chunked_start = (
@@ -527,6 +533,7 @@ def test_chunked(self):
527
533
data = self .urlopen ("http://localhost:%s/" % handler .port )
528
534
self .assertEqual (data , expected_response )
529
535
536
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
530
537
def test_404 (self ):
531
538
expected_response = b"Bad bad bad..."
532
539
handler = self .start_server ([(404 , [], expected_response )])
@@ -542,13 +549,15 @@ def test_404(self):
542
549
self .assertEqual (data , expected_response )
543
550
self .assertEqual (handler .requests , ["/weeble" ])
544
551
552
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
545
553
def test_200 (self ):
546
554
expected_response = b"pycon 2008..."
547
555
handler = self .start_server ([(200 , [], expected_response )])
548
556
data = self .urlopen ("http://localhost:%s/bizarre" % handler .port )
549
557
self .assertEqual (data , expected_response )
550
558
self .assertEqual (handler .requests , ["/bizarre" ])
551
559
560
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
552
561
def test_200_with_parameters (self ):
553
562
expected_response = b"pycon 2008..."
554
563
handler = self .start_server ([(200 , [], expected_response )])
@@ -559,6 +568,7 @@ def test_200_with_parameters(self):
559
568
560
569
# TODO: RUSTPYTHON
561
570
@unittest .expectedFailure
571
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
562
572
def test_https (self ):
563
573
handler = self .start_https_server ()
564
574
context = ssl .create_default_context (cafile = CERT_localhost )
@@ -567,6 +577,7 @@ def test_https(self):
567
577
568
578
# TODO: RUSTPYTHON
569
579
@unittest .expectedFailure
580
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
570
581
def test_https_with_cafile (self ):
571
582
handler = self .start_https_server (certfile = CERT_localhost )
572
583
with warnings_helper .check_warnings (('' , DeprecationWarning )):
@@ -584,6 +595,7 @@ def test_https_with_cafile(self):
584
595
self .urlopen ("https://localhost:%s/bizarre" % handler .port ,
585
596
cafile = CERT_fakehostname )
586
597
598
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
587
599
def test_https_with_cadefault (self ):
588
600
handler = self .start_https_server (certfile = CERT_localhost )
589
601
# Self-signed cert should fail verification with system certificate store
@@ -594,6 +606,7 @@ def test_https_with_cadefault(self):
594
606
595
607
# TODO: RUSTPYTHON
596
608
@unittest .expectedFailure
609
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
597
610
def test_https_sni (self ):
598
611
if ssl is None :
599
612
self .skipTest ("ssl module required" )
@@ -610,6 +623,7 @@ def cb_sni(ssl_sock, server_name, initial_context):
610
623
self .urlopen ("https://localhost:%s" % handler .port , context = context )
611
624
self .assertEqual (sni_name , "localhost" )
612
625
626
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
613
627
def test_sending_headers (self ):
614
628
handler = self .start_server ()
615
629
req = urllib .request .Request ("http://localhost:%s/" % handler .port ,
@@ -618,6 +632,7 @@ def test_sending_headers(self):
618
632
pass
619
633
self .assertEqual (handler .headers_received ["Range" ], "bytes=20-39" )
620
634
635
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
621
636
def test_basic (self ):
622
637
handler = self .start_server ()
623
638
with urllib .request .urlopen ("http://localhost:%s" % handler .port ) as open_url :
@@ -626,6 +641,7 @@ def test_basic(self):
626
641
"urlopen lacks the %s attribute" % attr )
627
642
self .assertTrue (open_url .read (), "calling 'read' failed" )
628
643
644
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
629
645
def test_info (self ):
630
646
handler = self .start_server ()
631
647
open_url = urllib .request .urlopen (
@@ -637,6 +653,7 @@ def test_info(self):
637
653
"instance of email.message.Message" )
638
654
self .assertEqual (info_obj .get_content_subtype (), "plain" )
639
655
656
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
640
657
def test_geturl (self ):
641
658
# Make sure same URL as opened is returned by geturl.
642
659
handler = self .start_server ()
@@ -645,13 +662,15 @@ def test_geturl(self):
645
662
url = open_url .geturl ()
646
663
self .assertEqual (url , "http://localhost:%s" % handler .port )
647
664
665
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
648
666
def test_iteration (self ):
649
667
expected_response = b"pycon 2008..."
650
668
handler = self .start_server ([(200 , [], expected_response )])
651
669
data = urllib .request .urlopen ("http://localhost:%s" % handler .port )
652
670
for line in data :
653
671
self .assertEqual (line , expected_response )
654
672
673
+ @unittest .skipIf (os .name == "nt" , "TODO: RUSTPYTHON, ValueError: illegal environment variable name" )
655
674
def test_line_iteration (self ):
656
675
lines = [b"We\n " , b"got\n " , b"here\n " , b"verylong " * 8192 + b"\n " ]
657
676
expected_response = b"" .join (lines )
0 commit comments