File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -107,10 +107,9 @@ def test_set_target(self):
107107 build = self .serialize_and_parse (["--set" , "target.x86_64-unknown-linux-gnu.cc=gcc" ])
108108 self .assertEqual (build .get_toml ("cc" , section = "target.x86_64-unknown-linux-gnu" ), 'gcc' )
109109
110- # Uncomment when #108928 is fixed.
111- # def test_set_top_level(self):
112- # build = self.serialize_and_parse(["--set", "profile=compiler"])
113- # self.assertEqual(build.get_toml("profile"), 'compiler')
110+ def test_set_top_level (self ):
111+ build = self .serialize_and_parse (["--set" , "profile=compiler" ])
112+ self .assertEqual (build .get_toml ("profile" ), 'compiler' )
114113
115114if __name__ == '__main__' :
116115 SUITE = unittest .TestSuite ()
Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ def configure_section(lines, config):
475475def configure_top_level_key (lines , top_level_key , value ):
476476 for i , line in enumerate (lines ):
477477 if line .startswith ('#' + top_level_key + ' = ' ) or line .startswith (top_level_key + ' = ' ):
478- lines [i ] = "{} = {}" .format (top_level_key , value )
478+ lines [i ] = "{} = {}" .format (top_level_key , to_toml ( value ) )
479479 return
480480
481481 raise RuntimeError ("failed to find config line for {}" .format (top_level_key ))
You can’t perform that action at this time.
0 commit comments