From eb93cd5537466a9f17957fac15d9c3aa524b5e47 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Wed, 13 Mar 2024 09:43:14 -0500 Subject: Implement test case for non-serializable json --- SCons/EnvironmentTests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SCons/EnvironmentTests.py b/SCons/EnvironmentTests.py index c40439a..8a385c1 100644 --- a/SCons/EnvironmentTests.py +++ b/SCons/EnvironmentTests.py @@ -3177,11 +3177,12 @@ def generate(env): def test_Dump(self) -> None: """Test the Dump() method""" - env = self.TestEnvironment(FOO = 'foo') + env = self.TestEnvironment(FOO='foo', FOOFLAGS=CLVar('--bar --baz')) assert env.Dump('FOO') == "'foo'", env.Dump('FOO') assert len(env.Dump()) > 200, env.Dump() # no args version assert env.Dump('FOO', 'json') == '"foo"' # JSON key version + self.assertEqual(env.Dump('FOOFLAGS', 'json'), '"<>"') import json env_dict = json.loads(env.Dump(format = 'json')) assert env_dict['FOO'] == 'foo' # full JSON version -- cgit v0.12