-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editables are local projects or VCS repositories as dependencies.
- Loading branch information
Showing
4 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,9 +107,7 @@ test('uses provided exec command', function (t) { | |
|
||
test('package name differs from requirement', function (t) { | ||
chdirWorkspaces('pip-app-deps-with-dashes'); | ||
return subProcess.execute('pip', | ||
['install', '-r', 'requirements.txt', '--disable-pip-version-check'] | ||
) | ||
return pipInstall() | ||
.then(function () { | ||
return plugin.inspect('.', 'requirements.txt') | ||
.then(function (result) { | ||
|
@@ -140,9 +138,7 @@ test('package name differs from requirement', function (t) { | |
|
||
test('package depends on platform', function (t) { | ||
chdirWorkspaces('pip-app-deps-conditional'); | ||
return subProcess.execute('pip', | ||
['install', '-r', 'requirements.txt', '--disable-pip-version-check'] | ||
) | ||
return pipInstall() | ||
.then(function () { | ||
return plugin.inspect('.', 'requirements.txt') | ||
.then(function (result) { | ||
|
@@ -164,6 +160,35 @@ test('package depends on platform', function (t) { | |
}); | ||
}); | ||
|
||
test('editables ignored', function (t) { | ||
chdirWorkspaces('pip-app-deps-editable'); | ||
return pipInstall() | ||
.then(function () { | ||
return plugin.inspect('.', 'requirements.txt') | ||
.then(function (result) { | ||
var pkg = result.package; | ||
t.notOk(pkg.dependencies['django-munigeo'], 'editable dep ignored'); | ||
t.same(pkg.dependencies['posix-ipc'], { | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
name: 'posix-ipc', | ||
version: '1.0.0', | ||
}, 'posix-ipc looks ok'); | ||
t.end(); | ||
}); | ||
}) | ||
.catch(function (error) { | ||
t.fail(error); | ||
}); | ||
}); | ||
|
||
function pipInstall() { | ||
return subProcess.execute('pip', | ||
['install', '-r', 'requirements.txt', '--disable-pip-version-check']); | ||
} | ||
|
||
function chdirWorkspaces(dir) { | ||
process.chdir(path.resolve(__dirname, 'workspaces', dir)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-e git+https://github.com/City-of-Helsinki/munigeo#egg=django-munigeo | ||
posix_ipc==1.0.0 |