Skip to content

Commit

Permalink
#1014: make test work on Windows (use normcase)
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed May 1, 2017
1 parent a85dfa7 commit 17cb9c5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions psutil/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,10 +657,11 @@ def test_memory_maps(self):
@unittest.skipIf(not HAS_MEMORY_MAPS, "not supported")
def test_memory_maps_lists_lib(self):
p = psutil.Process()
path = [x.path for x in p.memory_maps() if x.path.endswith(".so")][0]
newpath = copyload_shared_lib(path)
self.addCleanup(safe_rmpath, newpath)
assert any([x.path for x in p.memory_maps() if x.path == newpath])
ext = ".so" if POSIX else ".dll"
old = [x.path for x in p.memory_maps() if x.path.endswith(ext)][0]
new = os.path.normcase(copyload_shared_lib(old))
newpaths = [os.path.normcase(x.path) for x in p.memory_maps()]
self.assertIn(new, newpaths)

def test_memory_percent(self):
p = psutil.Process()
Expand Down

0 comments on commit 17cb9c5

Please sign in to comment.