File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 29
29
import SCons .Subst
30
30
import SCons .Warnings
31
31
from SCons .Util import cmp
32
+ from SCons .Variables import *
32
33
33
34
34
35
class Environment :
@@ -723,6 +724,27 @@ def test_AddOptionWithAliasUpdatesUnknown(self) -> None:
723
724
assert len (r ) == 0 , r
724
725
assert env ['ADDEDLATER' ] == 'added' , env ['ADDEDLATER' ]
725
726
727
+ def test_VariableTypesImportVisibility (self ) -> None :
728
+ """Test that 'from SCons.Variables import *' will import all types of SCons defined Variables
729
+ """
730
+
731
+ try :
732
+ x = BoolVariable ('test' , 'test option help' , False )
733
+ y = EnumVariable ('test' , 'test option help' , 0 ,
734
+ ['one' , 'two' , 'three' ],
735
+ {})
736
+ z = ListVariable ('test' , 'test option help' , 'all' ,
737
+ ['one' , 'two' , 'three' ])
738
+ o = PackageVariable ('test' , 'test build variable help' , '/default/path' )
739
+ p = PathVariable ('test' ,
740
+ 'test build variable help' ,
741
+ '/default/path' )
742
+ except Exception as e :
743
+ self .fail (f"Could not import all known Variable types: { e } " )
744
+
745
+
746
+
747
+
726
748
727
749
if __name__ == "__main__" :
728
750
unittest .main ()
You can’t perform that action at this time.
0 commit comments