Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 5cc9c88

Browse files
author
Mikhail Arkhipov
committed
Fold tests into one
1 parent c235fa5 commit 5cc9c88

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

src/Analysis/Engine/Test/AnalysisTest.cs

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,9 @@ def __invert__(self):
24252425

24262426

24272427
[TestMethod, Priority(0)]
2428-
public async Task TrueDividePython35() {
2428+
[DataRow(PythonLanguageVersion.V35)]
2429+
[DataRow(PythonLanguageVersion.V36)]
2430+
public async Task TrueDividePython3X(PythonLanguageVersion version) {
24292431
var text = @"
24302432
class C:
24312433
def __truediv__(self, other):
@@ -2438,28 +2440,7 @@ def __rtruediv__(self, other):
24382440
c = 'abc' / a
24392441
";
24402442

2441-
using (var server = await CreateServerAsync(PythonVersions.Required_Python35X)) {
2442-
var analysis = await server.OpenDefaultDocumentAndGetAnalysisAsync(text);
2443-
analysis.Should().HaveVariable("b").OfType(BuiltinTypeId.Int)
2444-
.And.HaveVariable("c").OfType(BuiltinTypeId.Float);
2445-
}
2446-
}
2447-
2448-
[TestMethod, Priority(0)]
2449-
public async Task TrueDividePython36() {
2450-
var text = @"
2451-
class C:
2452-
def __truediv__(self, other):
2453-
return 42
2454-
def __rtruediv__(self, other):
2455-
return 3.0
2456-
2457-
a = C()
2458-
b = a / 'abc'
2459-
c = 'abc' / a
2460-
";
2461-
2462-
using (var server = await CreateServerAsync(PythonVersions.Required_Python36X)) {
2443+
using (var server = await CreateServerAsync(PythonVersions.GetRequiredCPythonConfiguration(version))) {
24632444
var analysis = await server.OpenDefaultDocumentAndGetAnalysisAsync(text);
24642445
analysis.Should().HaveVariable("b").OfType(BuiltinTypeId.Int)
24652446
.And.HaveVariable("c").OfType(BuiltinTypeId.Float);

0 commit comments

Comments
 (0)