Skip to content

Commit

Permalink
Merge branch 'master' into fix1186
Browse files Browse the repository at this point in the history
  • Loading branch information
OsirisTerje committed Jul 18, 2024
2 parents 43dad5b + e0c21e5 commit d1e1296
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/NUnitTestAdapter/Execution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ protected TestFilter CheckFilter(TestFilter testFilter, IDiscoveryConverter disc
}
return testFilter;
}
if (testFilter.IsPartitionFilter())
{
return testFilter;
}
var filterBuilder = CreateTestFilterBuilder();
return filterBuilder.FilterByList(discovery.LoadedTestCases);
}
Expand Down
3 changes: 3 additions & 0 deletions src/NUnitTestAdapter/NUnitEngine/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public static bool AllWithEmptyFalse<T>(this IEnumerable<T> list, Func<T, bool>
public static bool IsCategoryFilter(this TestFilter filter) =>
filter != TestFilter.Empty && filter.Text.Contains("<cat>");

public static bool IsPartitionFilter(this TestFilter filter) =>
filter != TestFilter.Empty && filter.Text.Contains("<partition>");

public static bool IsNegativeCategoryFilter(this TestFilter filter) =>
filter.IsCategoryFilter() && filter.Text.Contains("<not><cat>");
}

0 comments on commit d1e1296

Please sign in to comment.