英文:
Can pycharm testing configurations be exported for use/re-import into another project?
问题
Is there a way to export the testing configurations that can be reimported to a fresh project?
背景:尽管venv
文件夹被排除在外,但它被打开了。当我点击文件夹以折叠它时,pycharm
会卡住(_macOS_的彩色旋转等待图标)。这种情况已经反复发生。
虽然我可能会考虑重新创建项目,但问题在于有许多测试配置,这些配置太有价值,不能简单丢弃。我需要一种方法来保存它们并将它们导入到重新创建的项目中。
英文:
Is there a way to export the testing configurations that can be reimported to a fresh project?
Background: Even though the venv
folder is Excluded it is opened up. When I click on the folder to collapse it, the pycharm
hangs (macOS beach ball). This has happened repeatedly.
While I might consider recreating the project, the problem is there are many testing configurations that are too valuable to simply throw away. I need a way to save them and pull them into the newly re-done project.
答案1
得分: 1
@bad_coder 在他的评论中提供了一个可行的答案。
> 我认为与IDE集成的唯一解决方案是在运行配置中设置存储为项目文件。某些路径可能是硬编码的(如项目、解释器、CWD和路径)...对生成的XML文件进行搜索/替换(手动或编写脚本)可能是完成此任务的最有效方式,因为项目/解释器通常由IDE管理,其中一些路径(如项目)将是IDE字符串而不是文件路径。
更多关于这个方法的详细信息将在后续提供。
英文:
@bad_coder has provided a workable answer in his comment.
> I think the only solution that's integrated with the IDE is setting Store as project file in the run configurations. Some paths are likely to be hardcoded (like Project, Interpreter, CWD and path)... Using search/replaced on the resulting XML files (by hand or writing a script) is likely the most efficient way to get it done, because project/interpreter is usually managed by the IDE some of those paths (like Project) will be an IDE string not a filepath.
More details on this approach to follow..
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论