From: Dmitry Shachnev <mitya57@debian.org>
Date: Fri, 4 Jan 2019 19:56:03 +0300
Subject: Make test_get_module_source() pass on Python 2

In Python < 3.4, module.__path__ can be relative path when the module
is loaded from the current directory (not from site-packages).

However, get_module_source() makes the path absolute, which caused
this test to fail.
---
 tests/test_util.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/test_util.py b/tests/test_util.py
index c664522..9696dfb 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -11,6 +11,7 @@
 
 import pytest
 from mock import patch
+from os import path
 
 from six import PY2
 
@@ -49,7 +50,7 @@ def test_display_chunk():
 
 def test_get_module_source():
     if PY2:
-        assert get_module_source('sphinx') == ('file', sphinx.__file__.replace('.pyc', '.py'))
+        assert get_module_source('sphinx') == ('file', path.abspath(sphinx.__file__).replace('.pyc', '.py'))
     else:
         assert get_module_source('sphinx') == ('file', sphinx.__file__)
 
