@@ -24,9 +24,7 @@ open class PydanticInitializerTest : PydanticTestCase() {
2424        try  {
2525            val  source =  File (" ${myFixture!! .testDataPath} /${testDataMethodPath.lowercase()} /pyproject.toml"  )
2626            pydanticConfigService.pyprojectToml =  target.path
27-             suspend {
28-                 target.writeText(source.bufferedReader().readText())
29-             }
27+             target.writeText(source.bufferedReader().readText())
3028            runnable()
3129
3230        } finally  {
@@ -50,18 +48,16 @@ open class PydanticInitializerTest : PydanticTestCase() {
5048    fun  testPyProjectToml () =  runTestRunnable {
5149        setUpPyProjectToml {
5250            initializeFileLoader()
53-             suspend {
54-                 assertEquals(this .pydanticConfigService.parsableTypeMap, mutableMapOf (
55-                     " pydantic.HttpUrl"   to listOf (" str"  ),
56-                     " datetime.datetime"   to listOf (" int"  )
57-                 ))
58-                 assertEquals(this .pydanticConfigService.acceptableTypeMap,
59-                     mutableMapOf (" str"   to listOf (" int"  , " float"  )))
60-                 assertEquals(this .pydanticConfigService.parsableTypeHighlightType, ProblemHighlightType .WEAK_WARNING )
61-                 assertEquals(this .pydanticConfigService.acceptableTypeHighlightType, ProblemHighlightType .WARNING )
62-                 assertEquals(this .pydanticConfigService.ignoreInitMethodArguments, true )
63-                 assertEquals(this .pydanticConfigService.ignoreInitMethodKeywordArguments, false )
64-             }
51+             assertEquals(this .pydanticConfigService.parsableTypeMap, mutableMapOf (
52+                 " pydantic.HttpUrl"   to listOf (" str"  ),
53+                 " datetime.datetime"   to listOf (" int"  )
54+             ))
55+             assertEquals(this .pydanticConfigService.acceptableTypeMap,
56+                 mutableMapOf (" str"   to listOf (" int"  , " float"  )))
57+             assertEquals(this .pydanticConfigService.parsableTypeHighlightType, ProblemHighlightType .WEAK_WARNING )
58+             assertEquals(this .pydanticConfigService.acceptableTypeHighlightType, ProblemHighlightType .WARNING )
59+             assertEquals(this .pydanticConfigService.ignoreInitMethodArguments, true )
60+             assertEquals(this .pydanticConfigService.ignoreInitMethodKeywordArguments, false )
6561        }
6662    }
6763
@@ -80,59 +76,49 @@ open class PydanticInitializerTest : PydanticTestCase() {
8076//         }
8177//     }
8278
83-     fun  testPyProjectTomlDisable () =  runTestRunnable {
84-         setUpPyProjectToml {
85-             initializeFileLoader()
86-             suspend {
87-                 assertEquals(this .pydanticConfigService.parsableTypeHighlightType, ProblemHighlightType .INFORMATION )
88-                 assertEquals(this .pydanticConfigService.acceptableTypeHighlightType, ProblemHighlightType .INFORMATION )
89-             }
90-         }
91-     }
79+ //     fun testPyProjectTomlDisable() = runTestRunnable {
80+ //         setUpPyProjectToml {
81+ //             initializeFileLoader()
82+ //             assertEquals(this.pydanticConfigService.parsableTypeHighlightType, ProblemHighlightType.INFORMATION)
83+ //             assertEquals(this.pydanticConfigService.acceptableTypeHighlightType, ProblemHighlightType.INFORMATION)
84+ //         }
85+ //     }
9286
9387    fun  testPyProjectTomlDefault ()  =  runTestRunnable {
9488        setUpPyProjectToml {
9589            initializeFileLoader()
96-             suspend {
97-                 assertEquals(this .pydanticConfigService.parsableTypeHighlightType, ProblemHighlightType .WARNING )
98-                 assertEquals(this .pydanticConfigService.acceptableTypeHighlightType, ProblemHighlightType .WEAK_WARNING )
99-                 assertEquals(this .pydanticConfigService.ignoreInitMethodArguments, false )
100-                 assertEquals(this .pydanticConfigService.ignoreInitMethodKeywordArguments, true )
101-            }
90+             assertEquals(this .pydanticConfigService.parsableTypeHighlightType, ProblemHighlightType .WARNING )
91+             assertEquals(this .pydanticConfigService.acceptableTypeHighlightType, ProblemHighlightType .WEAK_WARNING )
92+             assertEquals(this .pydanticConfigService.ignoreInitMethodArguments, false )
93+             assertEquals(this .pydanticConfigService.ignoreInitMethodKeywordArguments, true )
10294        }
10395    }
10496
10597    fun  testPyProjectTomlEmpty ()  =  runTestRunnable {
10698        setUpPyProjectToml {
10799            initializeFileLoader()
108-             suspend {
109-                 assertEquals(this .pydanticConfigService.parsableTypeMap, mutableMapOf<String , List <String >>())
110-                 assertEquals(this .pydanticConfigService.acceptableTypeMap, mutableMapOf<String , List <String >>())
111-                 assertEquals(this .pydanticConfigService.parsableTypeHighlightType, ProblemHighlightType .WARNING )
112-                 assertEquals(this .pydanticConfigService.acceptableTypeHighlightType, ProblemHighlightType .WEAK_WARNING )
113-             }
114-         }
115-     }
116- 
117-     fun  testNothingPyProjectToml () =  runTestRunnable {
118-         setUpConfig()
119-         suspend {
120100            assertEquals(this .pydanticConfigService.parsableTypeMap, mutableMapOf<String , List <String >>())
121101            assertEquals(this .pydanticConfigService.acceptableTypeMap, mutableMapOf<String , List <String >>())
122102            assertEquals(this .pydanticConfigService.parsableTypeHighlightType, ProblemHighlightType .WARNING )
123103            assertEquals(this .pydanticConfigService.acceptableTypeHighlightType, ProblemHighlightType .WEAK_WARNING )
124104        }
125105    }
126106
107+     fun  testNothingPyProjectToml () =  runTestRunnable {
108+         setUpConfig()
109+         assertEquals(this .pydanticConfigService.parsableTypeMap, mutableMapOf<String , List <String >>())
110+         assertEquals(this .pydanticConfigService.acceptableTypeMap, mutableMapOf<String , List <String >>())
111+         assertEquals(this .pydanticConfigService.parsableTypeHighlightType, ProblemHighlightType .WARNING )
112+         assertEquals(this .pydanticConfigService.acceptableTypeHighlightType, ProblemHighlightType .WEAK_WARNING )
113+     }
114+ 
127115    fun  testMypyIni () =  runTestRunnable {
128116        setUpMypyIni {
129117            initializeFileLoader()
130-             suspend {
131-                 assertEquals(this .pydanticConfigService.mypyWarnUntypedFields, true )
132-                 assertEquals(this .pydanticConfigService.mypyInitTyped, false )
133-                 assertEquals(this .pydanticConfigService.currentWarnUntypedFields, true )
134-                 assertEquals(this .pydanticConfigService.currentInitTyped, false )
135-             }
118+             assertEquals(this .pydanticConfigService.mypyWarnUntypedFields, true )
119+             assertEquals(this .pydanticConfigService.mypyInitTyped, false )
120+             assertEquals(this .pydanticConfigService.currentWarnUntypedFields, true )
121+             assertEquals(this .pydanticConfigService.currentInitTyped, false )
136122        }
137123    }
138124
@@ -151,37 +137,30 @@ open class PydanticInitializerTest : PydanticTestCase() {
151137    fun  testMypyIniEmpty () =  runTestRunnable {
152138        setUpMypyIni {
153139            initializeFileLoader()
154-             suspend {
155-                 assertEquals(this .pydanticConfigService.mypyWarnUntypedFields, null )
156-                 assertEquals(this .pydanticConfigService.mypyInitTyped, null )
157-                 assertEquals(this .pydanticConfigService.currentInitTyped, true )
158-                 assertEquals(this .pydanticConfigService.currentWarnUntypedFields, false )
159-             }
140+             assertEquals(this .pydanticConfigService.mypyWarnUntypedFields, null )
141+             assertEquals(this .pydanticConfigService.mypyInitTyped, null )
142+             assertEquals(this .pydanticConfigService.currentInitTyped, true )
143+             assertEquals(this .pydanticConfigService.currentWarnUntypedFields, false )
160144        }
161145    }
162146
163147    fun  testMypyIniBroken () =  runTestRunnable {
164148        setUpMypyIni {
165- 
166149            initializeFileLoader()
167-             suspend {
168-                 assertEquals(this .pydanticConfigService.mypyWarnUntypedFields, null )
169-                 assertEquals(this .pydanticConfigService.mypyInitTyped, null )
170-                 assertEquals(this .pydanticConfigService.currentInitTyped, true )
171-                 assertEquals(this .pydanticConfigService.currentWarnUntypedFields, false )
172-             }
150+             assertEquals(this .pydanticConfigService.mypyWarnUntypedFields, null )
151+             assertEquals(this .pydanticConfigService.mypyInitTyped, null )
152+             assertEquals(this .pydanticConfigService.currentInitTyped, true )
153+             assertEquals(this .pydanticConfigService.currentWarnUntypedFields, false )
173154        }
174155    }
175156
176157
177158    fun  testNothingMypyIni () =  runTestRunnable {
178159        setUpConfig()
179160        initializeFileLoader()
180-         suspend {
181-             assertEquals(this .pydanticConfigService.mypyWarnUntypedFields, null )
182-             assertEquals(this .pydanticConfigService.mypyInitTyped, null )
183-             assertEquals(this .pydanticConfigService.currentInitTyped, true )
184-             assertEquals(this .pydanticConfigService.currentWarnUntypedFields, false )
185-         }
161+         assertEquals(this .pydanticConfigService.mypyWarnUntypedFields, null )
162+         assertEquals(this .pydanticConfigService.mypyInitTyped, null )
163+         assertEquals(this .pydanticConfigService.currentInitTyped, true )
164+         assertEquals(this .pydanticConfigService.currentWarnUntypedFields, false )
186165    }
187166}
0 commit comments