我想使用诗歌来构建和分发Python源代码包,但是在poetry init运行poetry build.
ModuleOrPackageNotFound
No file/folder found for package mdspliter.tree
Run Code Online (Sandbox Code Playgroud) 在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?
帮助文档说该脚本将以“点源”模式执行,但事实并非如此。为什么?
我阅读了帮助文档全文,没有找到原因,所以才来求助。
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 微软文档