

strip () if expected_line is not None else None ) self. TestCase, expected_line : Optional = None, expected_regex : Optional = None, ) -> None : self. _AssertRaisesContext ): """ Attributes: lineno: the line number on which the error occured filename: the file in which the error occured """ _expected_line : Optional lineno : Optional filename : Optional def _init_ ( self, expected : Type, test_case : unittest. reverse () return res # pyre-fixme: Generic type `unittest.case._AssertRaisesContext` expects 1 type # parameter. append (( filename, lineno, line )) opt_tb = opt_tb. """ res = opt_tb = tb while opt_tb is not None : lineno = opt_tb. TracebackType ) -> List ]: """Get the filename and line number and line contents of all the lines in the traceback with the root at the top. # pyre-strict """Support functions for tests """ import contextlib import io import linecache import os import signal import subprocess import sys import types import unittest from functools import wraps from types import FrameType from typing import ( Any, Callable, ContextManager, Dict, Generator, List, Optional, Tuple, Type, TypeVar, Union, ) from unittest.mock import MagicMock import yappi from ax. import Base from ax. import object_attribute_dicts_find_unequal_fields T_AX_BASE_OR_ATTR_DICT = Union ] T = TypeVar ( "T" ) def _get_tb_lines ( tb : types.

#PYRE PYTHON CODE#
# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. #!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc.
