小编And*_*ndy的帖子

为什么诗歌构建会引发 ModuleOrPackageNotFound 异常?

我想使用诗歌来构建和分发Python源代码包,但是在poetry init运行poetry build.

  ModuleOrPackageNotFound
  No file/folder found for package mdspliter.tree
Run Code Online (Sandbox Code Playgroud)

python python-poetry

26
推荐指数
1
解决办法
3万
查看次数

如何在 VSCode 中使用 -OutPutDetailed 快速运行 Pester?

在VSCode中按快捷键“Ctrl+F5”即可运行后缀为“.tests.ps1”的Pester测试文件。

\n

在'about_Parsing.Tests.ps1'中按“Ctrl+F5”后,直接出现控制台:d:\\GitRepository\\PowerShell\\example\\pester\\\xe2\x80\xaaabout_Parsing\\\xe2\ x80\xaaabout_Parsing.Tests.ps1

\n

然后直接运行测试。

\n

如何以如此方便的方式运行测试并使用各种invoke-pester参数,例如-output detailed

\n

powershell unit-testing pester visual-studio-code

5
推荐指数
1
解决办法
1601
查看次数

为什么 PowerShell.exe 没有办法点源脚本?

帮助文档说该脚本将以“点源”模式执行,但事实并非如此。为什么?

我阅读了帮助文档全文,没有找到原因,所以才来求助。

PS> PowerShell.exe -File '.\dot-source-test.ps1'
PS> $theValue
PS> . '.\dot-source-test.ps1'
PS> $theValue
theValue
PS>
Run Code Online (Sandbox Code Playgroud)

“dot-source-test.ps1”的内容是$theValue = 'theValue'

如果 File 的值是文件路径,则脚本在本地范围(“点源”)中运行,以便脚本创建的函数和变量在当前会话中可用。

about_PowerShell_exe - PowerShell | about_PowerShell_exe 微软文档

powershell dot-source

2
推荐指数
1
解决办法
3733
查看次数