Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ento committed Nov 16, 2016
1 parent 2f22015 commit 4d54924
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions native_package_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ def format_tarball_url(package):
def packages_from_exact_deps(exact_dependencies):
"""
Parses the json and returns a list of {version, user, project}.
>>> packages_from_exact_deps({'elm-lang/navigation': '2.0.0'})
[{'version': '2.0.0', 'user': 'elm-lang', 'project': 'navigation'}]
>>> packages_from_exact_deps({'elm-lang/navigation': '2.0.0'}) \
== [{'version': '2.0.0', 'user': 'elm-lang', 'project': 'navigation'}]
True
"""
result = []

Expand Down Expand Up @@ -127,7 +128,7 @@ def package_name_from_repo(repository):
"""
User and project from repository.
>>> package_name_from_repo('https://github.com/NoRedInk/noredink.git')
['NoRedInk', 'noredink']
('NoRedInk', 'noredink')
"""

repo_without_domain = repository.split('https://github.com/')[1].split('.git')[0]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_native_package_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_update_source_directories_makes_minimum_changes(tmpdir):
assert set(new_elm_package_one['source-directories']) == set(('.', str(src_dir), str(src2_dir)))

new_elm_package_two = json.loads(elm_package_two_path.read())
assert set(new_elm_package_two['source-directories']) == set(('.', str(src_dir), str(src2_dir)))
assert set(new_elm_package_two['source-directories']) == set(('src', str(src_dir), str(src2_dir)))

for diff in difflib.ndiff(prev_lines, elm_package_one_path.read().splitlines()):
if diff.startswith(' '):
Expand Down

0 comments on commit 4d54924

Please sign in to comment.