Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Move testtypegen to pytest #3861

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 23, 2017
Merged
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions mypy/test/testtypegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@

from mypy import build
from mypy.build import BuildSource
from mypy.myunit import Suite
from mypy.test import config
from mypy.test.data import parse_test_cases, DataDrivenTestCase
from mypy.test.data import parse_test_cases, DataDrivenTestCase, DataSuite
from mypy.test.helpers import assert_string_arrays_equal
from mypy.util import short_type
from mypy.nodes import (
Expand All @@ -20,18 +19,19 @@
from mypy.options import Options


class TypeExportSuite(Suite):
class TypeExportSuite(DataSuite):
# List of files that contain test case descriptions.
files = ['typexport-basic.test']

def cases(self) -> List[DataDrivenTestCase]:
@classmethod
def cases(cls) -> List[DataDrivenTestCase]:
c = [] # type: List[DataDrivenTestCase]
for f in self.files:
for f in cls.files:
c += parse_test_cases(os.path.join(config.test_data_prefix, f),
self.run_test, config.test_temp_dir)
None, config.test_temp_dir)
return c

def run_test(self, testcase: DataDrivenTestCase) -> None:
def run_case(self, testcase: DataDrivenTestCase) -> None:
try:
line = testcase.input[0]
mask = ''
Expand Down
1 change: 1 addition & 0 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def add_imports(driver: Driver) -> None:
'testfinegrained',
'testmerge',
'testtransform',
'testtypegen',
'testparse',
]]

Expand Down