Skip to content

Commit

Permalink
[pysrc2cpg] Change Type Inference Test Expectation
Browse files Browse the repository at this point in the history
As a follow up on this PR #3544 I investigated the claim of the unresolved method being intended as labelled isExternal=false.

I think it's likely a dangerous assumption to have in the first place with a path that has as many dummy access paths  as the test had. I'm happy to keep the expectation to be isExternal=true.
  • Loading branch information
DavidBakerEffendi committed Aug 28, 2023
1 parent 23036f7 commit 7dae5e1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ class TypeRecoveryPassTests extends PySrc2CpgFixture(withOssDataflow = false) {
)
}

"correctly determine that, despite being unable to resolve the correct method full name, that it is an internal method" in {
"make no assumption that, despite the file being internal, that unless the entity is resolved, it is external" in {
val Some(selfFindFound) = cpg.typeDecl(".*InstallationsDAO.*").ast.isCall.name("find_one").headOption: @unchecked
selfFindFound.callee.isExternal.toSeq shouldBe Seq(true, true)
}
Expand Down

0 comments on commit 7dae5e1

Please sign in to comment.