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 2929import SCons .Subst
3030import SCons .Warnings
3131from SCons .Util import cmp
32+ from SCons .Variables import *
3233
3334
3435class Environment :
@@ -723,6 +724,27 @@ def test_AddOptionWithAliasUpdatesUnknown(self) -> None:
723724 assert len (r ) == 0 , r
724725 assert env ['ADDEDLATER' ] == 'added' , env ['ADDEDLATER' ]
725726
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+
726748
727749if __name__ == "__main__" :
728750 unittest .main ()
You can’t perform that action at this time.
0 commit comments