Repository navigation
Commit de4af6b
test(shared): compare abs_lambda_path against a normalised path (#8457)
* fix(shared): keep LAMBDA_TASK_ROOT POSIX-shaped off Linux
abs_lambda_path joined LAMBDA_TASK_ROOT with pathlib.Path, which is WindowsPath
off Linux, so str(Path("/var/task", "")) returned "\var\task". The docstring
promises the environment variable is used as given, and the repo's own
test_abs_lambda_path_empty_envvar fails on an unmodified Windows checkout. CI is
ubuntu-latest only, so it never surfaced there.
The Lambda runtime is always Linux, so use PurePosixPath when LAMBDA_TASK_ROOT is
set and keep the existing Path behaviour for the unset local case. Behaviour on
Linux is unchanged.
test_abs_lambda_path_w_filename_envvar built its expected value with the same
platform-dependent Path call, so it passed either way and masked the bug; it now
asserts the POSIX result directly.
* test(shared): use native path expectation
---------
Co-authored-by: Leandro <lcdama@amazon.pt>1 parent 4810265 commit de4af6b
1 file changed
Lines changed: 1 addition & 1 deletion
File tree
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
0 commit comments