Skip to content

Commit

Permalink
Issue pypa#557 fix test failing on windows.
Browse files Browse the repository at this point in the history
More path equality fun, use normpath to ensure path sep correct.
  • Loading branch information
pnasrat committed Jul 29, 2012
1 parent 67b4b51 commit 57f9be5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_uninstall.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import textwrap
import sys
from os.path import join, abspath
from os.path import join, abspath, normpath
from tempfile import mkdtemp
from mock import Mock
from nose.tools import assert_raises
Expand Down Expand Up @@ -65,10 +65,10 @@ def test_uninstall_overlapping_package():
assert join(env.site_packages, 'parent') in result1.files_created, sorted(result1.files_created.keys())
result2 = run_pip('install', child_pkg, expect_error=False)
assert join(env.site_packages, 'child') in result2.files_created, sorted(result2.files_created.keys())
assert join(env.site_packages, 'parent/plugins/child_plugin.py') in result2.files_created, sorted(result2.files_created.keys())
assert normpath(join(env.site_packages, 'parent/plugins/child_plugin.py')) in result2.files_created, sorted(result2.files_created.keys())
result3 = run_pip('uninstall', '-y', 'child', expect_error=False)
assert join(env.site_packages, 'child') in result3.files_deleted, sorted(result3.files_created.keys())
assert join(env.site_packages, 'parent/plugins/child_plugin.py') in result3.files_deleted, sorted(result3.files_deleted.keys())
assert normpath(join(env.site_packages, 'parent/plugins/child_plugin.py')) in result3.files_deleted, sorted(result3.files_deleted.keys())
assert join(env.site_packages, 'parent') not in result3.files_deleted, sorted(result3.files_deleted.keys())
# Additional check: uninstalling 'child' should return things to the
# previous state, without unintended side effects.
Expand Down

0 comments on commit 57f9be5

Please sign in to comment.