TST fixed ProjectUtilsTest on OS X

Temp folder can be a symlink on OS X.
This commit is contained in:
Mikhail Korobov 2017-02-16 16:32:23 +05:00
parent afac3fd2c2
commit f0c4e5dfd5
1 changed files with 4 additions and 1 deletions

View File

@ -31,5 +31,8 @@ class ProjectUtilsTest(unittest.TestCase):
def test_data_path_inside_project(self):
with inside_a_project() as proj_path:
expected = os.path.join(proj_path, '.scrapy', 'somepath')
self.assertEquals(expected, data_path('somepath'))
self.assertEquals(
os.path.realpath(expected),
os.path.realpath(data_path('somepath'))
)
self.assertEquals('/absolute/path', data_path('/absolute/path'))