Skip to content

Commit

Permalink
test: Multi editable pip install in shell script
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com>
  • Loading branch information
gabibguti committed Mar 10, 2023
1 parent f72217c commit 6eb976d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 9 additions & 3 deletions checks/raw/pinned_dependencies_test.go
Expand Up @@ -807,10 +807,16 @@ func TestShellscriptInsecureDownloadsLineNumber(t *testing.T) {
endLine: 52,
t: checker.DependencyUseTypePipCommand,
},
{
snippet: "pip install --no-deps -e . git+https://github.com/username/repo.git",
startLine: 53,
endLine: 53,
t: checker.DependencyUseTypePipCommand,
},
{
snippet: "python -m pip install --no-deps -e git+https://github.com/username/repo.git",
startLine: 54,
endLine: 54,
startLine: 56,
endLine: 56,
t: checker.DependencyUseTypePipCommand,
},
},
Expand Down Expand Up @@ -1083,7 +1089,7 @@ func TestShellScriptDownload(t *testing.T) {
{
name: "pkg managers",
filename: "./testdata/script-pkg-managers",
warns: 52,
warns: 53,
},
{
name: "invalid shell script",
Expand Down
2 changes: 2 additions & 0 deletions checks/raw/testdata/script-pkg-managers
Expand Up @@ -77,6 +77,8 @@ pip install --no-deps -e git+ssh://github.com/username/repo.git@0123456789abcdef
pip install --no-deps -e git+git://github.com/username/repo.git@0123456789abcdef0123456789abcdef01234567#egg=package
pip install --no-deps -e git://github.com/username/repo.git@0123456789abcdef0123456789abcdef01234567#egg=package
pip install -e git+https://github.com/username/repo.git@0123456789abcdef0123456789abcdef01234567#egg=package
pip install --no-deps -e . git+https://github.com/username/repo.git
pip install --no-deps -e . git+https://github.com/username/repo.git@0123456789abcdef0123456789abcdef01234567#egg=package

python -m notpip -X bla

Expand Down
2 changes: 2 additions & 0 deletions checks/raw/testdata/shell-download-lines.sh
Expand Up @@ -50,6 +50,8 @@ pip install --no-deps -e git+ssh://github.com/username/repo.git@0123456789abcdef
pip install --no-deps -e git+git://github.com/username/repo.git@0123456789abcdef0123456789abcdef01234567#egg=package
pip install --no-deps -e git://github.com/username/repo.git@0123456789abcdef0123456789abcdef01234567#egg=package
pip install -e git+https://github.com/username/repo.git@0123456789abcdef0123456789abcdef01234567#egg=package
pip install --no-deps -e . git+https://github.com/username/repo.git
pip install --no-deps -e . git+https://github.com/username/repo.git@0123456789abcdef0123456789abcdef01234567#egg=package

python -m pip install --no-deps -e git+https://github.com/username/repo.git
python -m pip install --no-deps -e git+https://github.com/username/repo.git@0123456789abcdef0123456789abcdef01234567#egg=package

0 comments on commit 6eb976d

Please sign in to comment.