TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Use weird tests to capture tacit knowledge

50 点作者 BerislavLopac大约 1 年前

5 条评论

contr-error大约 1 年前
More info on pytest&#x27;s test parametrization: <a href="https:&#x2F;&#x2F;docs.pytest.org&#x2F;en&#x2F;7.1.x&#x2F;how-to&#x2F;parametrize.html" rel="nofollow">https:&#x2F;&#x2F;docs.pytest.org&#x2F;en&#x2F;7.1.x&#x2F;how-to&#x2F;parametrize.html</a>
adql大约 1 年前
&gt; The perfect solution to this problem is creating a script that automatically adds a new app to all the relevant places and stuffing it into a Justfile, but that&#x27;s a pretty big piece of work that requires thought and error handling and a whole slew of other stuff. Instead, it&#x27;s comparatively easy to just capture these constraints in a test:<p>Just write the goddamn script. You can put comments in that too. Not saying it shouldn&#x27;t have tests but the solution to bunch of steps that need to be done always, and in same, easy to automate way is not &quot;make sure the checklist is always there so other people waste the optimum amount of time on it&quot;.
评论 #39770903 未加载
评论 #39765849 未加载
boxed大约 1 年前
&gt; pytest.ini, so tests are run;<p>Seems weird to me. I don&#x27;t have to add anything to this file when I add an app to my Django projects. How did you end up there?<p>&gt; pyproject.toml, so files are linted;<p>This too. Same comment as above.<p>&gt; modules.txt, so metrics are exported.<p>I don&#x27;t know what this is. Sounds like something specific to your code base?
philote大约 1 年前
If you&#x27;re able to automate a script for it, or make tests for it, it&#x27;s not tacit knowledge.<p>Also, as someone else has said, why not just automate the prcoess? Why spend the time to write a test when that time could be spent on the automation and saving everyone&#x27;s time in the future?
评论 #39768192 未加载
评论 #39768694 未加载
sd9大约 1 年前
I&#x27;ve done this before, it&#x27;s a good solution. It&#x27;s helpful to include relevant error messages to precisely explain what a future developer needs to do.