mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use frozensets for permitted types in `app.add_config_value()
`
This commit is contained in:
@@ -162,7 +162,7 @@ def test_config_pickle_circular_reference_in_list():
|
||||
|
||||
config = Config()
|
||||
config.add('a', [], '', types=list)
|
||||
config.add('b', [], '', types=list)
|
||||
config.add('b', [], '', types=frozenset({list}))
|
||||
config.a, config.b = a, b
|
||||
|
||||
actual = pickle.loads(pickle.dumps(config))
|
||||
@@ -244,7 +244,7 @@ def test_config_pickle_circular_reference_in_dict():
|
||||
check_is_serializable(x, circular=True)
|
||||
|
||||
config = Config()
|
||||
config.add('x', [], '', types=dict)
|
||||
config.add('x', [], '', types=frozenset({dict}))
|
||||
config.x = x
|
||||
|
||||
actual = pickle.loads(pickle.dumps(config))
|
||||
|
Reference in New Issue
Block a user