FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
aws-lambda-builders/tests/testing_utils.py at develop · TWSneo/aws-lambda-builders · GitHub
TWSneo
/
aws-lambda-builders
Public
forked from
aws/aws-lambda-builders
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
aws-lambda-builders
/
tests
/
testing_utils.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (18 loc) · 610 Bytes
Breadcrumbs
aws-lambda-builders
/
tests
/
testing_utils.py
Copy path
File metadata and controls
22 lines (18 loc) · 610 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import
os
def
read_link_without_junction_prefix
(
path
:
str
)
->
str
:
"""
When our tests run on CI on Windows, it seems to use junctions, which causes symlink targets
have a prefix. This function reads a symlink and returns the target without the prefix (if any).
Parameters
----------
path : str
Path which may or may not have a junction prefix.
Returns
-------
str
Path without junction prefix, if any.
"""
target
=
os
.
readlink
(
path
)
if
target
.
startswith
(
"
\\
\\
?
\\
"
):
# \\?\, with escaped slashes
target
=
target
[
4
:]
return
target
Back
|
FazBrowse Home
|
New Git URL