Skip to content

Commit fe0441e

Browse files
committed
Fix test for py>3.7
1 parent 6674f7f commit fe0441e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_code_generation/test_models_code_generator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class Test:
171171
"f": StringLiteral({'with \\ // slash'}),
172172
}),
173173
"fields": {
174-
"imports": "from typing_extensions import Literal",
174+
"imports": f"{LITERAL_SOURCE} import Literal",
175175
"fields": [
176176
'a: Literal["basic"]',
177177
'b: Literal["with space"]',
@@ -181,8 +181,8 @@ class Test:
181181
'f: Literal["with \\\\ // slash"]'
182182
]
183183
},
184-
"generated": trim("""
185-
from typing_extensions import Literal
184+
"generated": trim(f"""
185+
{LITERAL_SOURCE} import Literal
186186
187187
188188
class Test:

0 commit comments

Comments
 (0)