From 8d3e3ebc583eb3a4ca230fa41f06d8ef5d453d63 Mon Sep 17 00:00:00 2001 From: Jane Xu Date: Tue, 12 Apr 2022 00:54:18 +0000 Subject: [PATCH] Add note about testing inconsistency Mitigates #56396 The true fix would be https://github.com/pytorch/pytorch/pull/75608 but there are many issues to debug and this is a good step forward to at least clarify. Pull Request resolved: https://github.com/pytorch/pytorch/pull/75620 Approved by: https://github.com/kit1980, https://github.com/seemethere, https://github.com/malfet --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b20ecd3ffcb..a09e03c01e4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -342,6 +342,8 @@ The `expecttest` and `hypothesis` libraries must be installed to run the tests. an optional dependency, and `pytest` may help run tests more selectively. All these packages can be installed with `conda` or `pip`. +**Weird note:** In our CI (Continuous Integration) jobs, we actually run the tests from the `test` folder and **not** the root of the repo, since there are various dependencies we set up for CI that expects the tests to be run from the test folder. As such, there may be some inconsistencies between local testing and CI testing--if you observe an inconsistency, please [file an issue](https://github.com/pytorch/pytorch/issues/new/choose). + ### Better local unit tests with `pytest` We don't officially support `pytest`, but it works well with our