action test

This commit is contained in:
Eric Froemling 2020-03-26 19:35:56 -07:00
parent 90dfac00c6
commit 3dcea9da30
2 changed files with 12 additions and 13 deletions

View File

@ -451,19 +451,8 @@ def pytest() -> None:
if pypaths is None:
raise CleanError('python_paths not found in project config.')
if platform.system() == 'Windows':
sep = ';'
# pypaths = [
# os.path.join(os.getcwd(), s.replace('/', '\\')) for s in pypaths
# ]
else:
sep = ':'
os.environ['PYTHONPATH'] = sep.join(pypaths)
subprocess.run([PYTHON_BIN, '-c', 'import sys; print("FOOO", sys.path)'],
check=True)
print('SET VAL TO', ':'.join(pypaths), flush=True)
separator = ';' if platform.system() == 'Windows' else ':'
os.environ['PYTHONPATH'] = separator.join(pypaths)
# Also tell Python interpreters not to write __pycache__ dirs everywhere
# which can screw up our builds.

View File

@ -26,6 +26,7 @@ from typing import TYPE_CHECKING
import tempfile
import os
import subprocess
import logging
if TYPE_CHECKING:
from typing import Any, Type, Dict, Optional, List, Union
@ -180,8 +181,17 @@ def static_type_equals(value: Any, statictype: Union[Type, str]) -> bool:
a match (for instance, if mypy outputs 'builtins.int*' it will match
the 'int' type passed in as statictype).
"""
import platform
from inspect import getframeinfo, stack
# NOTE: don't currently support windows here; just going to always
# pass so we don't have to conditionalize all our individual test
# locations.
if platform.system() == 'Windows':
logging.debug('static_type_equals not supported on windows;'
' will always pass...')
return True
# We don't actually use there here; we pull them as strings from the src.
del value