Skip to content

Fix filter regression - ./runtest.py eval etc. #3879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ def add_mypy_package(self, name: str, packagename: str, *flags: str) -> None:
def add_mypy_string(self, name: str, *args: str, cwd: Optional[str] = None) -> None:
self.add_mypy_cmd(name, ['-c'] + list(args), cwd=cwd)

def add_pytest(self, name: str, pytest_files: List[str], coverage: bool = True) -> None:
pytest_args = pytest_files + self.arglist + self.pyt_arglist
full_name = 'pytest %s' % name
if not self.allow(full_name):
def add_pytest(self, pytest_files: List[str], coverage: bool = True) -> None:
pytest_files = [name for name in pytest_files if self.allow(name[4:])]
if not pytest_files:
return
pytest_args = pytest_files + self.arglist + self.pyt_arglist
if coverage and self.coverage:
args = [sys.executable, '-m', 'pytest', '--cov=mypy'] + pytest_args
else:
args = [sys.executable, '-m', 'pytest'] + pytest_args

self.waiter.add(LazySubprocess(full_name, args, env=self.env, passthrough=self.verbosity),
self.waiter.add(LazySubprocess('pytest', args, env=self.env, passthrough=self.verbosity),
sequential=True)

def add_python(self, name: str, *args: str, cwd: Optional[str] = None) -> None:
Expand Down Expand Up @@ -233,7 +233,7 @@ def test_path(*names: str):


def add_pytest(driver: Driver) -> None:
driver.add_pytest('pytest', PYTEST_FILES)
driver.add_pytest(PYTEST_FILES)


def add_myunit(driver: Driver) -> None:
Expand Down