Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ilanschnell committed Feb 29, 2016
1 parent 0633f44 commit b4142f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions conda/cli/main_clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def configure_parser(sub_parsers):
# Adapted from the ntfsutils package, Copyright (c) 2012, the Mozilla Foundation
class CrossPlatformStLink(object):
_st_nlink = None

def __call__(self, path):
return self.st_nlink(path)

Expand All @@ -96,7 +96,7 @@ def _windows_st_nlink(cls, path):
GENERIC_READ = 0x80000000
FILE_SHARE_READ = 0x00000001
OPEN_EXISTING = 3
hfile = cls.CreateFile(path, GENERIC_READ, FILE_SHARE_READ, None,
hfile = cls.CreateFile(path, GENERIC_READ, FILE_SHARE_READ, None,
OPEN_EXISTING, 0, None)
if hfile is None:
from ctypes import WinError
Expand Down Expand Up @@ -150,7 +150,7 @@ class BY_HANDLE_FILE_INFORMATION(ctypes.Structure):
cls.GetFileInformationByHandle = ctypes.windll.kernel32.GetFileInformationByHandle
cls.GetFileInformationByHandle.argtypes = [HANDLE, POINTER(BY_HANDLE_FILE_INFORMATION)]
cls.GetFileInformationByHandle.restype = BOOL

cls._st_nlink = cls._windows_st_nlink


Expand Down Expand Up @@ -253,7 +253,7 @@ def find_pkgs():
# TODO: This doesn't handle packages that have hard links to files within
# themselves, like bin/python3.3 and bin/python3.3m in the Python package
warnings = []

cross_platform_st_nlink = CrossPlatformStLink()
pkgs_dirs = defaultdict(list)
for pkgs_dir in config.pkgs_dirs:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def test_LinearBound():
({'x1':2, '!x2':2}, [0, 2], 1000),
([(1, 1), (2, 2), (3, 3)], [3, 3], 1000),
([(0, 1), (1, 2), (2, 3), (0, 4), (1, 5), (0, 6), (1, 7)], [0, 2], 1000),
([(0, 1), (1, 2), (2, 3), (0, 4), (1, 5), (0, 6), (1, 7),
([(0, 1), (1, 2), (2, 3), (0, 4), (1, 5), (0, 6), (1, 7),
(3, False), (2, True)], [2, 4], 1000),
([(1, 15), (2, 16), (3, 17), (4, 18), (5, 6), (5, 19), (6, 7),
(6, 20), (7, 8), (7, 21), (7, 28), (8, 9), (8, 22), (8, 29), (8, 41), (9,
Expand Down Expand Up @@ -252,7 +252,7 @@ def sat(val):
return Clauses().sat(val)
assert raises(ValueError, lambda: minimal_unsatisfiable_subset([[1]], sat))

clauses = [[-10], [1], [5], [2, 3], [3, 4], [5, 2], [-7], [2], [3],
clauses = [[-10], [1], [5], [2, 3], [3, 4], [5, 2], [-7], [2], [3],
[-2, -3, 5], [7, 8, 9, 10], [-8], [-9]]
res = minimal_unsatisfiable_subset(clauses, sat)
assert sorted(res) == [[-10], [-9], [-8], [-7], [7, 8, 9, 10]]
Expand Down

0 comments on commit b4142f4

Please sign in to comment.