From 6e4dfaefad9889384ed8bb3d31eb88446fb1e246 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sat, 1 Apr 2023 10:54:13 +0100 Subject: [PATCH] add warning about `cd /d` in test-command I wouldn't normally document OS features/quirks in our documentation, but here, it wasn't the user that changed the working dir to another drive, it was cibuildwheel, so it seems fair to note some gotchas. --- docs/options.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/options.md b/docs/options.md index 257cd3bd..db99ffc3 100644 --- a/docs/options.md +++ b/docs/options.md @@ -1172,6 +1172,14 @@ The command is run in a shell, so you can write things like `cmd1 && cmd2`. Platform-specific environment variables are also available:
`CIBW_TEST_COMMAND_MACOS` | `CIBW_TEST_COMMAND_WINDOWS` | `CIBW_TEST_COMMAND_LINUX` +!!! tip + + It's isn't recommended to `cd` to your project directory before running tests, + because Python might resolve `import yourpackage` relative to the working dir, + but we want to test the wheel you just built. However, if you're sure that's not + an issue for you and your workflow requires it, on Windows you should do `cd /d`, + because the CWD and project dir might be on different drives. + #### Examples !!! tab examples "Environment variables"