我们如何从 dotnet test
中排除特定命名空间?
dotnet test --filter ExcellentQualifiedName~Namespace.Here
适用于包含命名空间,但 !~
无法识别排除命名空间。
最佳答案
根据https://learn.microsoft.com/en-us/dotnet/core/testing/selective-unit-tests?pivots=mstest您需要转义感叹号:
Using filters that include exclamation mark ! on *nix requires escaping since ! is reserved.
所以我想你需要这样做:
dotnet test --filter FullyQualifiedName\!~Namespace.Here
关于c# - 从 dotnet 测试中排除命名空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57255567/