Skip to content

Commit 3b6ab28

Browse files
committed
fix tests
1 parent d626e40 commit 3b6ab28

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

packages/settings-library/requirements/_base.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,23 @@ markdown-it-py==3.0.0
66
# via rich
77
mdurl==0.1.2
88
# via markdown-it-py
9+
orjson==3.10.10
10+
# via
11+
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
12+
# -c requirements/../../../requirements/constraints.txt
13+
# -r requirements/../../../packages/common-library/requirements/_base.in
914
pydantic==2.9.2
1015
# via
1116
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
1217
# -c requirements/../../../requirements/constraints.txt
1318
# -r requirements/../../../packages/common-library/requirements/_base.in
1419
# -r requirements/_base.in
20+
# pydantic-extra-types
1521
# pydantic-settings
1622
pydantic-core==2.23.4
1723
# via pydantic
24+
pydantic-extra-types==2.9.0
25+
# via -r requirements/../../../packages/common-library/requirements/_base.in
1826
pydantic-settings==2.5.2
1927
# via -r requirements/_base.in
2028
pygments==2.18.0

packages/settings-library/tests/test__pydantic_settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ def test_construct(monkeypatch):
132132
# from __init__
133133
settings_from_init = Settings(
134134
VALUE=1,
135-
VALUE_ALSO_REQUIRED=10,
136135
VALUE_NULLABLE_REQUIRED=None,
136+
VALUE_NULLABLE_REQUIRED_AS_WELL=None,
137+
VALUE_REQUIRED_AS_WELL=32,
137138
)
138139

139140
print(settings_from_init.model_dump_json(exclude_unset=True, indent=1))
@@ -145,6 +146,8 @@ def test_construct(monkeypatch):
145146
"VALUE": "1",
146147
"VALUE_ALSO_REQUIRED": "10",
147148
"VALUE_NULLABLE_REQUIRED": "null",
149+
"VALUE_NULLABLE_REQUIRED_AS_WELL": "null",
150+
"VALUE_REQUIRED_AS_WELL": "32",
148151
},
149152
) # WARNING: set this env to None would not work w/o ``parse_none`` validator! bug???
150153

0 commit comments

Comments
 (0)