Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit 0bcf5b4

Browse files
committed
Parameterize OverrideCompletions3X
1 parent f6a78e5 commit 0bcf5b4

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/Analysis/Engine/Test/AnalysisTest.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4415,19 +4415,21 @@ class oar(list):
44154415
}
44164416
}
44174417

4418-
[TestMethod, Priority(0)]
4419-
public async Task OverrideCompletions3X() {
4418+
[DataRow(PythonLanguageVersion.V36, "value")]
4419+
[DataRow(PythonLanguageVersion.V37, "object")]
4420+
[DataTestMethod, Priority(0)]
4421+
public async Task OverrideCompletions3X(PythonLanguageVersion version, string parameterName) {
44204422
var code = @"
44214423
class oar(list):
44224424
def
44234425
pass
44244426
";
4425-
using (var server = await CreateServerAsync(PythonVersions.LatestAvailable3X)) {
4427+
using (var server = await CreateServerAsync(PythonVersions.GetRequiredCPythonConfiguration(version))) {
44264428
var uri = await server.OpenDefaultDocumentAndGetUriAsync(code);
44274429
var completions = await server.SendCompletion(uri, 2, 8);
44284430

44294431
completions.Should().HaveItem("append")
4430-
.Which.Should().HaveInsertText("append(self, value):\r\n return super().append(value)");
4432+
.Which.Should().HaveInsertText($"append(self, {parameterName}):\r\n return super().append({parameterName})");
44314433
}
44324434
}
44334435

0 commit comments

Comments
 (0)