Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
soapy1 committed Nov 17, 2016
1 parent 8c6bfa6 commit dad41b8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
5 changes: 2 additions & 3 deletions conda/core/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from functools import wraps
from logging import DEBUG, getLogger
from os import makedirs
from os.path import dirname, join
from requests.exceptions import ConnectionError, HTTPError, SSLError
from requests.packages.urllib3.exceptions import InsecureRequestWarning
from os.path import join

from .linked_data import linked_data
from .package_cache import package_cache
Expand All @@ -20,7 +20,7 @@
from ..base.constants import CONDA_HOMEPAGE_URL, DEFAULTS, MAX_CHANNEL_PRIORITY
from ..base.context import context
from ..common.compat import iteritems, itervalues
from ..common.url import join_url, url_to_path
from ..common.url import join_url
from ..connection import CondaSession
from ..exceptions import CondaHTTPError, CondaRuntimeError
from ..models.channel import Channel, offline_keep, prioritize_channels
Expand Down Expand Up @@ -145,7 +145,6 @@ def get_json_str(filename, resp_content):
return resp_content.decode('utf-8')

if url.startswith('file://'):
file_path = url_to_path(url)
json_str = get_json_str(filename, resp.content)
else:
json_str = get_json_str(filename, resp.content)
Expand Down
1 change: 0 additions & 1 deletion conda/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from __future__ import absolute_import, division, print_function, unicode_literals

import logging
import os
import sys
from logging import getLogger
from traceback import format_exc
Expand Down
14 changes: 0 additions & 14 deletions tests/test_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,3 @@ def test_permission_file():

path = basename(lock.lock_file_path)
assert not exists(join(f.name, path))


def test_delete_lock():
from .test_create import make_temp_env
from conda.exceptions import delete_lock
with make_temp_env() as prefix:
try:
with DirectoryLock(prefix) as lock:
path = basename(lock.lock_file_path)
assert isfile(join(prefix, path))
raise TypeError
except TypeError:
delete_lock(extra_path=prefix)
assert not exists(join(prefix, path))

0 comments on commit dad41b8

Please sign in to comment.