aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy_tests/test_tidy.py
diff options
context:
space:
mode:
authoraskeing <askeing@gmail.com>2016-04-14 16:13:48 +0800
committeraskeing <askeing@gmail.com>2016-04-14 21:19:16 +0900
commit8c4c899ef95c9d9f61ceec5b56692f3839940cb4 (patch)
tree9832fd3b3a9bec7ae7096714de0acb26d9ab7725 /python/tidy/servo_tidy_tests/test_tidy.py
parent753db5e119447fc10961ca9571c7cc224a6c141a (diff)
downloadservo-8c4c899ef95c9d9f61ceec5b56692f3839940cb4.tar.gz
servo-8c4c899ef95c9d9f61ceec5b56692f3839940cb4.zip
Modified the servo_tidy_tests for both "./mach" and "make test"
- fix `cd python/tidy; make test` fail issue
Diffstat (limited to 'python/tidy/servo_tidy_tests/test_tidy.py')
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py
index f49f6d9a23d..d0e19daafb1 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -7,12 +7,14 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.
+import os
import unittest
from servo_tidy import tidy
def iterFile(name):
- return iter(['python/tidy/servo_tidy_tests/' + name])
+ path = 'servo_tidy_tests/' if os.path.exists('servo_tidy_tests/') else 'python/tidy/servo_tidy_tests/'
+ return iter([os.path.join(path, name)])
class CheckTidiness(unittest.TestCase):