gpt4 book ai didi

c# - 从 dotnet 测试中排除命名空间

转载 作者:行者123 更新时间:2023-12-03 08:53:42 25 4
gpt4 key购买 nike

我们如何从 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com