]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix coverage for NoseTestEngine
authorAviv Eyal <avivey@gmail.com>
Mon, 30 Sep 2013 17:44:38 +0000 (10:44 -0700)
committerepriestley <git@epriestley.com>
Mon, 30 Sep 2013 17:44:38 +0000 (10:44 -0700)
Summary:
In case that the $source_path is `.` or empty, it produces filenames that
look like `./foo.py`, which differential doesn't like.

Test Plan: arc diff, see coverage data.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran
Differential Revision: https://secure.phabricator.com/D7181

src/unit/engine/NoseTestEngine.php

index 00296a0885c10f5f80768877315f31e539a4d9e3..807e4161daa6cb0d395b79935ea2cdf40c7f3639 100644 (file)
@@ -127,6 +127,7 @@ final class NoseTestEngine extends ArcanistBaseUnitTestEngine {
       $relative_path = explode(".", $class->getAttribute("filename"));
       array_pop($relative_path);
       $relative_path = $source_path .'/'. implode("/", $relative_path);
+      $relative_path = Filesystem::readablePath($relative_path);
 
       // first we check if the path is a directory (a Python package), if it is
       // set relative and absolute paths to have __init__.py at the end.