-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from wpoely86/finalfix
Fix dependency_links injection for real
- Loading branch information
Showing
2 changed files
with
50 additions
and
22 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 |
---|---|---|
|
@@ -219,3 +219,37 @@ def test_parse_target(self): | |
self.assertTrue(new_target['long_description'].startswith("Description\n===========")) | ||
|
||
klass.SHARED_TARGET = orig_target | ||
|
||
def test_parse_target_dependencies(self): | ||
"""Test injecting dependency_links in parse_target""" | ||
package = { | ||
'name': 'vsc-test', | ||
'excluded_pkgs_rpm': [], | ||
'version': '1.0', | ||
'install_requires': [ | ||
'vsc-config >= 2.0.0', | ||
'vsc-accountpage-clients', | ||
'vsc-base > 1.0.0' | ||
], | ||
} | ||
setup = vsc_setup() | ||
# this is needed to pass the tests on Travis: travis will clone vsc-install through | ||
# https and it will be marked as non private repo, causing the dependency_links to be injected | ||
# with git+https, which is not correct in this test case. | ||
setup.private_repo = True | ||
new_target = setup.parse_target(package) | ||
|
||
dep_links_urls = [ | ||
'git+ssh://[email protected]/hpcugent/vsc-accountpage-clients.git#egg=vsc-accountpage-clients', | ||
'git+ssh://[email protected]/hpcugent/vsc-accountpage-clients.git#egg=vsc-accountpage-clients', | ||
'git+ssh://[email protected]/hpcugent/vsc-config.git#egg=vsc-config-2.0.0', | ||
'git+ssh://[email protected]/hpcugent/vsc-config.git#egg=vsc-config-2.0.0', | ||
'git+ssh://[email protected]/hpcugent/vsc-base.git#egg=vsc-base-1.0.0', | ||
'git+ssh://[email protected]/hpcugent/vsc-base.git#egg=vsc-base-1.0.0', | ||
] | ||
|
||
for url in dep_links_urls: | ||
self.assertIn(url, new_target['dependency_links']) | ||
|
||
package['install_requires'].append('vsc-utils<=1.0.0') | ||
self.assertRaises(ValueError, setup.parse_target, package) |