Skip to content

Commit

Permalink
revert export behavior and fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoTian committed Aug 18, 2016
1 parent 7eb1c1f commit f922efe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
3 changes: 1 addition & 2 deletions conda/cli/main_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ def execute(args, parser):
if args.canonical:
format = 'canonical'
elif args.export:
print_explicit(prefix, args.md5)
return
format = 'export'
else:
format = 'human'

Expand Down
28 changes: 0 additions & 28 deletions tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,6 @@ def test_basic(self):
output2, error= run_command(Commands.LIST, prefix2, "-e")
self.assertEqual(output, output2)

def test_multi_channel_export(self):
"""
When try to import from txt
every package should come from same channel
"""
with make_temp_env("python=3") as prefix:
assert exists(join(prefix, PYTHON_BINARY))
assert_package_is_installed(prefix, 'python-3')

run_command(Commands.INSTALL, prefix, "six", "-c", "conda-forge")
assert_package_is_installed(prefix, "six")

output, error = run_command(Commands.LIST, prefix, "-e")
self.assertIn("conda-forge", output)

with tempfile.NamedTemporaryFile(mode="w", suffix="txt", delete=False) as env_txt:
env_txt.write(output)
env_txt.flush()
env_txt.close()
prefix2 = make_temp_prefix()
run_command(Commands.CREATE, prefix2, "--file " + env_txt.name)

assert_package_is_installed(prefix2, "python")
assert_package_is_installed(prefix2, "six")

output2, _ = run_command(Commands.LIST, prefix2, "-e")
self.assertEqual(output, output2)

def test_multi_channel_explicit(self):
"""
When try to import from txt
Expand Down

0 comments on commit f922efe

Please sign in to comment.