Skip to content

Commit

Permalink
Refactor test
Browse files Browse the repository at this point in the history
  • Loading branch information
lshala committed Sep 25, 2024
1 parent 82a41c7 commit 4dd725c
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,16 @@ class StatementHandlerTest : BaseTest() {
@Test
fun testTypeHints() {
analyzeFile("type_hints.py")

// type comments
val a = result.refs["a"]
assertNotNull(a)
assertEquals(with(result) { assertResolvedType("int") }, a.type)

// type annotation
val b = result.refs["b"]
assertNotNull(b)
assertEquals(with(result) { assertResolvedType("str") }, b.type)
with(result) {
// type comments
val a = result.refs["a"]
assertNotNull(a)
assertEquals(assertResolvedType("int"), a.type)

// type annotation
val b = result.refs["b"]
assertNotNull(b)
assertEquals(assertResolvedType("str"), b.type)
}
}
}

0 comments on commit 4dd725c

Please sign in to comment.