Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ngoldbaum/ed96966689e14d3050bed6d5287e578b to your computer and use it in GitHub Desktop.
Save ngoldbaum/ed96966689e14d3050bed6d5287e578b to your computer and use it in GitHub Desktop.
# run the full numpy test suite
$ spin test
Invoking `build` prior to running tests:
$ /Users/goldbaum/.pyenv/versions/3.13-dev-nogil/bin/python3.13 vendored-meson/meson/meson.py compile -C build
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /Users/goldbaum/.pyenv/versions/3.13-dev-nogil/bin/ninja -C /Users/goldbaum/Documents/numpy/build
ninja: Entering directory `/Users/goldbaum/Documents/numpy/build'
[1/1] Generating numpy/generate-version with a custom command
Saving version to numpy/version.py
$ /Users/goldbaum/.pyenv/versions/3.13-dev-nogil/bin/python3.13 vendored-meson/meson/meson.py install --only-changed -C build --destdir ../build-install
$ export PYTHONPATH="/Users/goldbaum/Documents/numpy/build-install/usr/lib/python3.13/site-packages"
$ /Users/goldbaum/.pyenv/versions/3.13-dev-nogil/bin/python3.13 -P -c 'import numpy'
$ export PYTHONPATH="/Users/goldbaum/Documents/numpy/build-install/usr/lib/python3.13/site-packages"
$ cd /Users/goldbaum/Documents/numpy/build-install/usr/lib/python3.13/site-packages
$ /Users/goldbaum/.pyenv/versions/3.13-dev-nogil/bin/python3.13 -m pytest --rootdir=/Users/goldbaum/Documents/numpy/build-install/usr/lib/python3.13/site-packages -m 'not slow' -x
==================================================================================== test session starts =====================================================================================
platform darwin -- Python 3.13.0a6+, pytest-8.2.0, pluggy-1.5.0
rootdir: /Users/goldbaum/Documents/numpy/build-install/usr/lib/python3.13/site-packages
configfile: ../../../../../pytest.ini
plugins: hypothesis-6.100.2
collected 46841 items / 2782 deselected / 1 skipped / 44059 selected
numpy/_core/tests/test__exceptions.py ........... [ 0%]
numpy/_core/tests/test_abc.py ..... [ 0%]
numpy/_core/tests/test_api.py ................................................... [ 0%]
numpy/_core/tests/test_argparse.py ...... [ 0%]
numpy/_core/tests/test_array_coercion.py .............................................................x............................................................................... [ 0%]
....................................................................... [ 0%]
numpy/_core/tests/test_arraymethod.py ........................................ [ 0%]
numpy/_core/tests/test_arrayobject.py ..... [ 0%]
numpy/_core/tests/test_arrayprint.py ..x.....................
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /Users/goldbaum/Documents/hypothesis/hypothesis-python/src/hypothesis/internal/entropy.py(122)register_random()
-> if not gc.get_referrers(r):
(Pdb) p gc.get_referrers(r)
[{'r': <random.Random object at 0x5ed1cd82810>}]
# just run the test that's supposed to fail
± spin test -- -x numpy/_core/tests/test_arrayprint.py
Invoking `build` prior to running tests:
$ /Users/goldbaum/.pyenv/versions/3.13-dev-nogil/bin/python3.13 vendored-meson/meson/meson.py compile -C build
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /Users/goldbaum/.pyenv/versions/3.13-dev-nogil/bin/ninja -C /Users/goldbaum/Documents/numpy/build
ninja: Entering directory `/Users/goldbaum/Documents/numpy/build'
[1/1] Generating numpy/generate-version with a custom command
Saving version to numpy/version.py
$ /Users/goldbaum/.pyenv/versions/3.13-dev-nogil/bin/python3.13 vendored-meson/meson/meson.py install --only-changed -C build --destdir ../build-install
$ export PYTHONPATH="/Users/goldbaum/Documents/numpy/build-install/usr/lib/python3.13/site-packages"
$ /Users/goldbaum/.pyenv/versions/3.13-dev-nogil/bin/python3.13 -P -c 'import numpy'
$ export PYTHONPATH="/Users/goldbaum/Documents/numpy/build-install/usr/lib/python3.13/site-packages"
$ cd /Users/goldbaum/Documents/numpy/build-install/usr/lib/python3.13/site-packages
$ /Users/goldbaum/.pyenv/versions/3.13-dev-nogil/bin/python3.13 -m pytest --rootdir=/Users/goldbaum/Documents/numpy/build-install/usr/lib/python3.13/site-packages -m 'not slow' -x numpy/_core/tests/test_arrayprint.py
==================================================================================== test session starts =====================================================================================
platform darwin -- Python 3.13.0a6+, pytest-8.2.0, pluggy-1.5.0
rootdir: /Users/goldbaum/Documents/numpy/build-install/usr/lib/python3.13/site-packages
configfile: ../../../../../pytest.ini
plugins: hypothesis-6.100.2
collected 111 items
numpy/_core/tests/test_arrayprint.py ..x.....................
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /Users/goldbaum/Documents/hypothesis/hypothesis-python/src/hypothesis/internal/entropy.py(122)register_random()
-> if not gc.get_referrers(r):
(Pdb) p gc.get_referrers(r)
['__loader__': <_frozen_importlib_external.SourceFileLoader object at 0x2e3fa7c92b0>, '__spec__': ModuleSpec(name='hypothesis.core', loader=<_frozen_importlib_external.SourceFileLoader object at 0x2e3fa7c92b0>, origin='/Users/goldbaum/Documents/hypothesis/hypothesis-python/src/hypothesis/core.py'), '__file__': '/Users/goldbaum/Documents/hypothesis/hypothesis-python/src/hypothesis/core.py', '__cached__': '/Users/goldbaum/Documents/hypothesis/hypothesis-python/src/hypothesis/__pycache__/core.cpython-313.pyc', '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, types, exceptions, and other objects.\n\nThis module provides direct access to all 'built-in'\nidentifiers of Python; for example, builtins.len is\nthe full name for the built-in function len().\n\nThis module is not normally accessed explicitly by most\napplications, but can be useful in modules that provide\nobjects with the same name as a built-in value, but in\nwhich the built-in of that name is also needed.", '__package__': '', '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), '__build_class__': <built-in function __build_class__>, '__import__': <built-in function __import__>, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'breakpoint': <built-in function breakpoint>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'compile': <built-in function compile>, 'delattr': <built-in function delattr>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'format': <built-in function format>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'aiter': <built-in function aiter>, 'len': <built-in function len>, 'locals': <built-in function locals>, 'max': <built-in function max>, 'min': <built-in function min>, 'next': <built-in function next>, 'anext': <built-in function anext>, 'oct': <built-in function oct>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'repr': <built-in function repr>, 'round': <built-in function round>, 'setattr': <built-in function setattr>, 'sorted': <built-in function sorted>, 'sum': <built-in function sum>, 'vars': <built-in function vars>, 'None': None, 'Ellipsis': Ellipsis, 'NotImplemented': NotImplemented, 'False': False, 'True': True, 'bool': <class 'bool'>, 'memoryview': <class 'memoryview'>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'classmethod': <class 'classmethod'>, 'complex': <class 'complex'>, 'dict': <class 'dict'>, 'enumerate': <class 'enumerate'>, 'filter': <class 'filter'>, 'float': <class 'float'>, 'frozenset': <class 'frozenset'>, 'property': <class 'property'>, 'int': <class 'int'>, 'list': <class 'list'>, 'map': <class 'map'>, 'object': <class 'object'>, 'range': <class 'range'>, 'reversed': <class 'reversed'>, 'set': <class 'set'>, 'slice': <class 'slice'>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'zip': <class 'zip'>, '__debug__': True, 'BaseException': <class 'BaseException'>, 'BaseExceptionGroup': <class 'BaseExceptionGroup'>, 'Exception': <class 'Exception'>, 'GeneratorExit': <class 'GeneratorExit'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'SystemExit': <class 'SystemExit'>, 'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BufferError': <class 'BufferError'>, 'EOFError': <class 'EOFError'>, 'ImportError': <class 'ImportError'>, 'LookupError': <class 'LookupError'>, 'MemoryError': <class 'MemoryError'>, 'NameError': <class 'NameError'>, 'OSError': <class 'OSError'>, 'ReferenceError': <class 'ReferenceError'>, 'RuntimeError': <class 'RuntimeError'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SystemError': <class 'SystemError'>, 'TypeError': <class 'TypeError'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'FloatingPointError': <class 'FloatingPointError'>, 'OverflowError': <class 'OverflowError'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, 'BytesWarning': <class 'BytesWarning'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'EncodingWarning': <class 'EncodingWarning'>, 'FutureWarning': <class 'FutureWarning'>, 'ImportWarning': <class 'ImportWarning'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'BlockingIOError': <class 'BlockingIOError'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionError': <class 'ConnectionError'>, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'InterruptedError': <class 'InterruptedError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'NotADirectoryError': <class 'NotADirectoryError'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'TimeoutError': <class 'TimeoutError'>, 'IndentationError': <class 'IndentationError'>, 'IncompleteInputError': <class 'IncompleteInputError'>, 'IndexError': <class 'IndexError'>, 'KeyError': <class 'KeyError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'NotImplementedError': <class 'NotImplementedError'>, 'PythonFinalizationError': <class 'PythonFinalizationError'>, 'RecursionError': <class 'RecursionError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeError': <class 'UnicodeError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'TabError': <class 'TabError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'ExceptionGroup': <class 'ExceptionGroup'>, 'EnvironmentError': <class 'OSError'>, 'IOError': <class 'OSError'>, 'open': <built-in function open>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'copyright': Copyright (c) 2001-2024 Python Software Foundation.
All Rights Reserved.
Copyright (c) 2000 BeOpen.com.
All Rights Reserved.
Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
for supporting Python development. See www.python.org for more information., 'license': Type license() to see the full license text, 'help': Type help() for interactive help, or help(object) for help about object.}, 'base64': <module 'base64' from '/Users/goldbaum/.pyenv/versions/3.13-dev-nogil/lib/python3.13/base64.py'>, 'contextlib': <module 'contextlib' from '/Users/goldbaum/.pyenv/versions/3.13-dev-nogil/lib/python3.13/contextlib.py'>, 'datetime': <module 'datetime' from '/Users/goldbaum/.pyenv/versions/3.13-dev-nogil/lib/python3.13/datetime.py'>, 'inspect': <module 'inspect' from '/Users/goldbaum/.pyenv/versions/3.13-dev-nogil/lib/python3.13/inspect.py'>, 'io': <module 'io' (frozen)>, 'math': <module 'math' from '/Users/goldbaum/.pyenv/versions/3.13-dev-nogil/lib/python3.13/lib-dynload/math.cpython-313t-darwin.so'>, 'sys': <module 'sys' (built-in)>, 'time': <module 'time' (built-in)>, 'types': <module 'types' from '/Users/goldbaum/.pyenv/versions/3.13-dev-nogil/lib/python3.13/types.py'>, 'unittest': <module 'unittest' from '/Users/goldbaum/.pyenv/versions/3.13-dev-nogil/lib/python3.13/unittest/__init__.py'>, 'warnings': <module 'warnings' from '/Users/goldbaum/.pyenv/versions/3.13-dev-nogil/lib/python3.13/warnings.py'>, 'zlib': <module 'zlib' from '/Users/goldbaum/.pyenv/versions/3.13-dev-nogil/lib/python3.13/lib-dynload/zlib.cpython-313t-darwin.so'>, 'defaultdict': <class 'collections.defaultdict'>, 'partial': <class 'functools.partial'>, 'Random': <class 'random.Random'>, 'TYPE_CHECKING': False, 'Any': typing.Any, 'BinaryIO': <class 'typing.BinaryIO'>, 'Callable': typing.Callable, 'Coroutine': typing.Coroutine, 'Hashable': typing.Hashable, 'List': typing.List, 'Optional': typing.Optional, 'Tuple': typing.Tuple, 'Type': typing.Type, 'TypeVar': <class 'typing.TypeVar'>, 'Union': typing.Union, 'overload': <function overload at 0x2e3fa594560>, 'TestCase': <class 'unittest.case.TestCase'>, 'attr': <module 'attr' from '/Users/goldbaum/.pyenv/versions/3.13-dev-nogil/lib/python3.13/site-packages/attr/__init__.py'>, 'st': <module 'hypothesis.strategies' from '/Users/goldbaum/Documents/hypothesis/hypothesis-python/src/hypothesis/strategies/__init__.py'>, 'HealthCheck': <enum 'HealthCheck'>, 'Phase': <enum 'Phase'>, 'Verbosity': <enum 'Verbosity'>, 'local_settings': <function local_settings at 0x2e3fc144380>, 'Settings': <class 'hypothesis.settings'>, 'BuildContext': <class 'hypothesis.control.BuildContext'>, 'DeadlineExceeded': <class 'hypothesis.errors.DeadlineExceeded'>, 'DidNotReproduce': <class 'hypothesis.errors.DidNotReproduce'>, 'FailedHealthCheck': <class 'hypothesis.errors.FailedHealthCheck'>, 'Flaky': <class 'hypothesis.errors.Flaky'>, 'Found': <class 'hypothesis.errors.Found'>, 'HypothesisDeprecationWarning': <class 'hypothesis.errors.HypothesisDeprecationWarning'>, 'HypothesisWarning': <class 'hypothesis.errors.HypothesisWarning'>, 'InvalidArgument': <class 'hypothesis.errors.InvalidArgument'>, 'NoSuchExample': <class 'hypothesis.errors.NoSuchExample'>, 'StopTest': <class 'hypothesis.errors.StopTest'>, 'Unsatisfiable': <class 'hypothesis.errors.Unsatisfiable'>, 'UnsatisfiedAssumption': <class 'hypothesis.errors.UnsatisfiedAssumption'>, 'PYPY': False, 'BaseExceptionGroup': <class 'BaseExceptionGroup'>, 'add_note': <function add_note at 0x2e3fc2fe7e0>, 'bad_django_TestCase': <function bad_django_TestCase at 0x2e3fc2fed80>, 'get_type_hints': <function get_type_hints at 0x2e3fc2feb00>, 'int_from_bytes': <function int_from_bytes at 0x2e3fc2fea60>, 'ConjectureData': <class 'hypothesis.internal.conjecture.data.ConjectureData'>, 'Status': <enum 'Status'>, 'BUFFER_SIZE': 8192, 'ConjectureRunner': <class 'hypothesis.internal.conjecture.engine.ConjectureRunner'>, 'ensure_free_stackframes': <class 'hypothesis.internal.conjecture.junkdrawer.ensure_free_stackframes'>, 'sort_key': <function sort_key at 0x2e3fb48f820>, 'deterministic_PRNG': <function deterministic_PRNG at 0x2e3fc773d40>, 'InterestingOrigin': <class 'hypothesis.internal.escalation.InterestingOrigin'>, 'current_pytest_item': <hypothesis.utils.dynamicvariables.DynamicVariable object at 0x2e3fae66910>, 'escalate_hypothesis_internal_error': <function escalate_hypothesis_internal_error at 0x2e3fbb2f5a0>, 'format_exception': <function format_exception at 0x2e3fc1450a0>, 'get_trimmed_traceback': <function get_trimmed_traceback at 0x2e3fbb2eec0>, 'fail_health_check': <function fail_health_check at 0x2e3fbb2f8c0>, 'OBSERVABILITY_COLLECT_COVERAGE': True, 'TESTCASE_CALLBACKS': [], '_system_metadata': <functools._lru_cache_wrapper object at 0x2e3fb8ee880>, 'deliver_json_blob': <function deliver_json_blob at 0x2e3fbb28340>, 'make_testcase': <function make_testcase at 0x2e3fbb288e0>, 'convert_positional_arguments': <function convert_positional_arguments at 0x2e3fc141e00>, 'define_function_signature': <function define_function_signature at 0x2e3fc1424e0>, 'function_digest': <function function_digest at 0x2e3fc141a40>, 'get_pretty_function_description': <function get_pretty_function_description at 0x2e3fc142120>, 'get_signature': <function get_signature at 0x2e3fc141b80>, 'impersonate': <function impersonate at 0x2e3fc142580>, 'is_mock': <function is_mock at 0x2e3fc141900>, 'nicerepr': <function nicerepr at 0x2e3fc1421c0>, 'proxies': <function proxies at 0x2e3fc142760>, 'repr_call': <function repr_call at 0x2e3fc142260>, 'MONITORING_TOOL_ID': 3, 'Trace': typing.Set[typing.Tuple[typing.Optional[typing.Tuple[str, int]], typing.Tuple[str, int]]], 'Tracer': <class 'hypothesis.internal.scrutineer.Tracer'>, 'explanatory_lines': <function explanatory_lines at 0x2e3fc8b0460>, 'tractable_coverage_report': <function tractable_coverage_report at 0x2e3fc8b0f00>, 'check_type': <function check_type at 0x2e3fc142620>, 'current_verbosity': <function current_verbosity at 0x2e3fbb287a0>, 'report': <function report at 0x2e3fbb28520>, 'verbose_report': <function verbose_report at 0x2e3fbb28660>, 'with_reporter': <function with_reporter at 0x2e3fbb28840>, 'describe_statistics': <function describe_statistics at 0x2e3fc8b1400>, 'describe_targets': <function describe_targets at 0x2e3fc8b12c0>, 'note_statistics': <function note_statistics at 0x2e3fc8b1220>, 'NOTHING': nothing(), 'Ex': +Ex, 'SearchStrategy': <class 'hypothesis.strategies.SearchStrategy'>, 'check_strategy': <function check_strategy at 0x2e3fbb2e420>, 'to_jsonable': <function to_jsonable at 0x2e3fbb2b220>, 'RepresentationPrinter': <class 'hypothesis.vendor.pretty.RepresentationPrinter'>, '__version__': '6.100.2', 'EllipsisType': <class 'ellipsis'>, 'TestFunc': ~TestFunc, 'running_under_pytest': True, 'pytest_shows_exceptiongroups': True, 'global_force_seed': None, '_hypothesis_global_random': <random.Random object at 0x2e3fad81e10>, 'Example': <class 'hypothesis.core.Example'>, 'example': <class 'hypothesis.core.example'>, 'seed': <function seed at 0x2e3fc8b1a40>, 'reproduce_failure': <function reproduce_failure at 0x2e3fc8b1900>, 'encode_failure': <function encode_failure at 0x2e3fc8b1fe0>, 'decode_failure': <function decode_failure at 0x2e3fc8b2080>, '_invalid': <function _invalid at 0x2e3fc8b2120>, 'is_invalid_test': <function is_invalid_test at 0x2e3fc8b21c0>, 'execute_explicit_examples': <function execute_explicit_examples at 0x2e3fc8b2260>, 'get_random_for_wrapped_test': <function get_random_for_wrapped_test at 0x2e3fc8b2300>, 'Stuff': <class 'hypothesis.core.Stuff'>, 'process_arguments_to_given': <function process_arguments_to_given at 0x2e3fc8b2440>, 'skip_exceptions_to_reraise': <function skip_exceptions_to_reraise at 0x2e3fc8b2940>, 'failure_exceptions_to_catch': <function failure_exceptions_to_catch at 0x2e3fc8b28a0>, 'new_given_signature': <function new_given_signature at 0x2e3fc8b2760>, 'default_executor': <function default_executor at 0x2e3fc8b2620>, 'get_executor': <function get_executor at 0x2e3fc8b24e0>, 'StateForActualGivenExecution': <class 'hypothesis.core.StateForActualGivenExecution'>, '_raise_to_user': <function _raise_to_user at 0x2e3fc8b32a0>, 'fake_subTest': <function fake_subTest at 0x2e3fc8b33e0>, 'HypothesisHandle': <class 'hypothesis.core.HypothesisHandle'>, 'given': <function given at 0x2e3fc8b4920>, 'find': <function find at 0x2e3fc8b4ce0>}, {'r': <random.Random object at 0x2e3fad81e10>}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment