瀏覽代碼

Add instruction for running unit tests in parallel (#13928)

Ashish Kumar 1 年之前
父節點
當前提交
5c429b86b4
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 1 0
      changelog.d/13928.doc
  2. 6 0
      docs/development/contributing_guide.md

+ 1 - 0
changelog.d/13928.doc

@@ -0,0 +1 @@
+Add instruction to contributing guide for running unit tests in parallel. Contributed by @ashfame.

+ 6 - 0
docs/development/contributing_guide.md

@@ -167,6 +167,12 @@ was broken. They are slower than the linters but will typically catch more error
 poetry run trial tests
 ```
 
+You can run unit tests in parallel by specifying `-jX` argument to `trial` where `X` is the number of parallel runners you want. To use 4 cpu cores, you would run them like:
+
+```sh
+poetry run trial -j4 tests
+```
+
 If you wish to only run *some* unit tests, you may specify
 another module instead of `tests` - or a test class or a method: