Add Python JSON tests (#407)

This commit is contained in:
Gautham 2022-05-14 01:32:15 +05:30 committed by GitHub
parent d25a67f4eb
commit f6df29cc3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 536 additions and 345 deletions

View file

@ -283,7 +283,9 @@ class TestLoader(object):
if os.path.isdir(os.path.abspath(start_dir)):
start_dir = os.path.abspath(start_dir)
if start_dir != top_level_dir:
is_not_importable = not os.path.isfile(os.path.join(start_dir, '__init__.py'))
is_not_importable_py = not os.path.isfile(os.path.join(start_dir, '__init__.py'))
is_not_importable_pyc = not os.path.isfile(os.path.join(start_dir, '__init__.pyc'))
is_not_importable = is_not_importable_py and is_not_importable_pyc
else:
# support for discovery from dotted module names
try: