mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Modified the servo_tidy_tests for both "./mach" and "make test"
- fix `cd python/tidy; make test` fail issue
This commit is contained in:
parent
753db5e119
commit
8c4c899ef9
2 changed files with 4 additions and 4 deletions
|
@ -16,9 +16,7 @@ dev-env: $(VENV)/bin/python
|
||||||
# for testing
|
# for testing
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: dev-env
|
test: dev-env
|
||||||
$(VENV)/bin/pip install --upgrade funcsigs
|
$(VENV)/bin/python -m unittest discover -s servo_tidy_tests -v
|
||||||
$(VENV)/bin/pip install --upgrade mock
|
|
||||||
$(VENV)/bin/python -m unittest discover -s tests -v
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
|
@ -7,12 +7,14 @@
|
||||||
# option. This file may not be copied, modified, or distributed
|
# option. This file may not be copied, modified, or distributed
|
||||||
# except according to those terms.
|
# except according to those terms.
|
||||||
|
|
||||||
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
from servo_tidy import tidy
|
from servo_tidy import tidy
|
||||||
|
|
||||||
|
|
||||||
def iterFile(name):
|
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):
|
class CheckTidiness(unittest.TestCase):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue