From 4d54924a4953253fa2cdc0a6ba54bd2ca29e20e5 Mon Sep 17 00:00:00 2001 From: Marica Odagaki Date: Tue, 15 Nov 2016 20:25:48 -0800 Subject: [PATCH] Fix tests --- native_package_install.py | 7 ++++--- tests/test_native_package_install.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/native_package_install.py b/native_package_install.py index 66408ab..109379c 100755 --- a/native_package_install.py +++ b/native_package_install.py @@ -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 = [] @@ -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] diff --git a/tests/test_native_package_install.py b/tests/test_native_package_install.py index 4a60908..0838c72 100644 --- a/tests/test_native_package_install.py +++ b/tests/test_native_package_install.py @@ -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(' '):