@@ -602,51 +602,92 @@ def test_success(self):
602
602
class Test_python_versions (DictTest ):
603
603
config_var = python_versions
604
604
test_value = {"3.6" : {"experimental" : True }, "3.7" : {}, "pypy3" : {"option" : "Value" }}
605
- default_value = {"3.8" : {"experimental" : False , "matrix_exclude" : {}}}
605
+ default_value = {
606
+ "3.8" : {
607
+ "experimental" : False ,
608
+ "matrix_exclude" : {},
609
+ "platforms" : ["Windows" , "macOS" , "Linux" ],
610
+ }
611
+ }
606
612
607
613
def test_success (self ):
608
614
value = ["3.6" , 3.7 , "pypy37" , "pypy38" , "pypy310" ]
609
615
assert self .config_var .get ({self .config_var .__name__ : value }) == {
610
- "3.6" : {"experimental" : False , "matrix_exclude" : {}},
611
- "3.7" : {"experimental" : False , "matrix_exclude" : {}},
612
- "pypy37" : {"experimental" : False , "matrix_exclude" : {}},
613
- "pypy38" : {"experimental" : False , "matrix_exclude" : {}},
614
- "pypy310" : {"experimental" : True , "matrix_exclude" : {}},
616
+ "3.6" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : ["Windows" , "macOS" , "Linux" ]},
617
+ "3.7" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : ["Windows" , "macOS" , "Linux" ]},
618
+ "pypy37" : {
619
+ "experimental" : False ,
620
+ "matrix_exclude" : {},
621
+ "platforms" : ["Windows" , "macOS" , "Linux" ],
622
+ },
623
+ "pypy38" : {
624
+ "experimental" : False ,
625
+ "matrix_exclude" : {},
626
+ "platforms" : ["Windows" , "macOS" , "Linux" ],
627
+ },
628
+ "pypy310" : {
629
+ "experimental" : True ,
630
+ "matrix_exclude" : {},
631
+ "platforms" : ["Windows" , "macOS" , "Linux" ],
632
+ },
615
633
}
616
634
617
635
value2 = {
618
- "3.6" : {"experimental" : True , "matrix_exclude" : {}},
619
- "3.7" : {"experimental" : False , "matrix_exclude" : {}},
620
- "pypy3" : {"option" : "Value" , "experimental" : False , "matrix_exclude" : {}}
636
+ "3.6" : {"experimental" : True , "matrix_exclude" : {}, "platforms" : ["Windows" , "macOS" , "Linux" ]},
637
+ "3.7" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : ["Windows" , "macOS" , "Linux" ]},
638
+ "pypy3" : {
639
+ "option" : "Value" ,
640
+ "experimental" : False ,
641
+ "matrix_exclude" : {},
642
+ "platforms" : ["Windows" , "macOS" , "Linux" ],
643
+ }
621
644
}
622
645
assert self .config_var .get ({self .config_var .__name__ : self .test_value }) == value2
623
646
assert self .config_var .get ({self .config_var .__name__ : value2 }) == value2
624
647
625
648
assert python_versions .get ({"python_deploy_version" : 3.8 }) == {
626
- "3.8" : {"experimental" : False , "matrix_exclude" : {}},
649
+ "3.8" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : [ "Windows" , "macOS" , "Linux" ] },
627
650
}
628
651
assert python_versions .get ({"python_deploy_version" : "3.8" }) == {
629
- "3.8" : {"experimental" : False , "matrix_exclude" : {}},
652
+ "3.8" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : [ "Windows" , "macOS" , "Linux" ] },
630
653
}
631
654
632
655
assert self .config_var .get ({self .config_var .__name__ : ["3.6" , 3.7 , "pypy3" ]}) == {
633
- "3.6" : {"experimental" : False , "matrix_exclude" : {}},
634
- "3.7" : {"experimental" : False , "matrix_exclude" : {}},
635
- "pypy3" : {"experimental" : False , "matrix_exclude" : {}},
656
+ "3.6" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : [ "Windows" , "macOS" , "Linux" ] },
657
+ "3.7" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : [ "Windows" , "macOS" , "Linux" ] },
658
+ "pypy3" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : [ "Windows" , "macOS" , "Linux" ] },
636
659
}
637
660
assert self .config_var .get ({self .config_var .__name__ : ["3.6" , "3.7" , "pypy3" ]}) == {
638
- "3.6" : {"experimental" : False , "matrix_exclude" : {}},
639
- "3.7" : {"experimental" : False , "matrix_exclude" : {}},
640
- "pypy3" : {"experimental" : False , "matrix_exclude" : {}},
661
+ "3.6" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : [ "Windows" , "macOS" , "Linux" ] },
662
+ "3.7" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : [ "Windows" , "macOS" , "Linux" ] },
663
+ "pypy3" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : [ "Windows" , "macOS" , "Linux" ] },
641
664
}
642
665
666
+ assert self .config_var .get ({
667
+ self .config_var .__name__ : {"3.6" : {}, "3.7" : None , "pypy3" : {"platforms" : ["macOS" , "Linux" ]}}
668
+ }) == {
669
+ "3.6" : {
670
+ "experimental" : False ,
671
+ "matrix_exclude" : {},
672
+ "platforms" : ["Windows" , "macOS" , "Linux" ]
673
+ },
674
+ "3.7" : {
675
+ "experimental" : False ,
676
+ "matrix_exclude" : {},
677
+ "platforms" : ["Windows" , "macOS" , "Linux" ]
678
+ },
679
+ "pypy3" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : ["macOS" , "Linux" ]},
680
+ }
681
+
643
682
assert self .config_var .get ({self .config_var .__name__ : {}}) == {}
644
683
assert self .config_var .get (self .different_key_value ) == self .default_value
645
684
646
685
assert self .config_var .get () == self .default_value
647
686
assert self .config_var .get ({}) == self .default_value
648
687
649
- expected_3_6 = {"3.6" : {"experimental" : False , "matrix_exclude" : {}}}
688
+ expected_3_6 = {
689
+ "3.6" : {"experimental" : False , "matrix_exclude" : {}, "platforms" : ["Windows" , "macOS" , "Linux" ]}
690
+ }
650
691
assert self .config_var .get ({** self .different_key_value , "python_versions" : [3.6 ]}) == expected_3_6
651
692
652
693
def test_error_list_int (self ):
0 commit comments