@@ -556,7 +556,7 @@ def _assert_supported(valid_systems, valid_prog_environs,
556556
557557 # Check AND in features and extras
558558 _assert_supported (
559- valid_systems = ['+cuda +mpi %gpu_arch=v100' ],
559+ valid_systems = [r '+cuda +mpi %gpu_arch=v100' ],
560560 valid_prog_environs = ['*' ],
561561 expected = {}
562562 )
@@ -566,9 +566,18 @@ def _assert_supported(valid_systems, valid_prog_environs,
566566 expected = {}
567567 )
568568
569- # Check OR in features ad extras
569+ # Check OR in features and extras
570570 _assert_supported (
571- valid_systems = ['+cuda +mpi' , '%gpu_arch=v100' ],
571+ valid_systems = ['+cuda +mpi' , r'%gpu_arch=v100' ],
572+ valid_prog_environs = ['*' ],
573+ expected = {
574+ 'testsys:gpu' : ['PrgEnv-gnu' , 'builtin' ]
575+ }
576+ )
577+
578+ # Check that extra keys can used as features
579+ _assert_supported (
580+ valid_systems = ['+cuda +mpi' , '+gpu_arch' ],
572581 valid_prog_environs = ['*' ],
573582 expected = {
574583 'testsys:gpu' : ['PrgEnv-gnu' , 'builtin' ]
@@ -640,23 +649,23 @@ def _assert_supported(valid_systems, valid_prog_environs,
640649 )
641650 _assert_supported (
642651 valid_systems = ['*' ],
643- valid_prog_environs = ['%bar=x' ],
652+ valid_prog_environs = [r '%bar=x' ],
644653 expected = {
645654 'testsys:gpu' : [],
646655 'testsys:login' : ['PrgEnv-gnu' ]
647656 }
648657 )
649658 _assert_supported (
650659 valid_systems = ['*' ],
651- valid_prog_environs = ['%foo=2' ],
660+ valid_prog_environs = [r '%foo=2' ],
652661 expected = {
653662 'testsys:gpu' : ['PrgEnv-gnu' ],
654663 'testsys:login' : []
655664 }
656665 )
657666 _assert_supported (
658667 valid_systems = ['*' ],
659- valid_prog_environs = ['%foo=bar' ],
668+ valid_prog_environs = [r '%foo=bar' ],
660669 expected = {
661670 'testsys:gpu' : [],
662671 'testsys:login' : []
@@ -671,6 +680,24 @@ def _assert_supported(valid_systems, valid_prog_environs,
671680 }
672681 )
673682
683+ # Check that extra keys can used as features
684+ _assert_supported (
685+ valid_systems = ['*' ],
686+ valid_prog_environs = ['+foo +bar' ],
687+ expected = {
688+ 'testsys:gpu' : ['PrgEnv-gnu' ],
689+ 'testsys:login' : ['PrgEnv-gnu' ]
690+ }
691+ )
692+ _assert_supported (
693+ valid_systems = ['*' ],
694+ valid_prog_environs = ['+foo -bar' ],
695+ expected = {
696+ 'testsys:gpu' : [],
697+ 'testsys:login' : []
698+ }
699+ )
700+
674701 # Check valid_systems / valid_prog_environs combinations
675702 _assert_supported (
676703 valid_systems = ['testsys:login' ],
0 commit comments