Major refactor to allow lazy sync iterators. #29
GitHub Actions / test-pypypy3.9-on-macos-11
failed
Oct 11, 2023 in 0s
test-pypypy3.9-on-macos-11 ❌
❌ test_pypypy3.9_on_macos-11.xml
36 tests were completed in 2s with 34 passed, 1 failed and 1 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
pytest | 34✅ | 1❌ | 1⚪ | 2s |
❌ pytest
once_test.TestFunctionInspection
✅ test_async_function
✅ test_sync_agenerator_function
✅ test_sync_function
✅ test_sync_generator_function
once_test.TestOnce
✅ test_closure_gc
✅ test_counter_works
✅ test_different_args_same_result
✅ test_different_fn_do_not_deadlock
✅ test_function_signature_preserved
✅ test_iterator
✅ test_iterator_parallel_execution
✅ test_lock_bypass
✅ test_once_not_allowed_on_method
✅ test_once_per_class
✅ test_once_per_class_classmethod
✅ test_once_per_class_not_allowed_on_classmethod
✅ test_once_per_class_not_allowed_on_staticmethod
✅ test_once_per_class_staticmethod
✅ test_once_per_instance
✅ test_once_per_instance_do_not_block_each_other
✅ test_once_per_instance_not_allowed_on_function
✅ test_receiving_iterator
✅ test_receiving_iterator_parallel_execution
❌ test_receiving_iterator_parallel_execution_halting
self = <once_test.TestOnce testMethod=test_receiving_iterator_parallel_execution_halting>
✅ test_threaded_multiple_functions
✅ test_threaded_single_function
once_test.TestOnceAsync
✅ test_fn_called_once
✅ test_inspect_func
✅ test_inspect_iterator
✅ test_iterator
✅ test_iterator_is_lazily_evaluted
⚪ test_iterator_lock_not_held_during_evaluation
✅ test_once_per_class
✅ test_once_per_class_classmethod
✅ test_once_per_class_staticmethod
✅ test_receiving_iterator
Annotations
Check failure on line 0 in test_pypypy3.9_on_macos-11.xml
github-actions / test-pypypy3.9-on-macos-11
pytest ► once_test.TestOnce ► test_receiving_iterator_parallel_execution_halting
Failed test found in:
test_pypypy3.9_on_macos-11.xml
Error:
self = <once_test.TestOnce testMethod=test_receiving_iterator_parallel_execution_halting>
Raw output
self = <once_test.TestOnce testMethod=test_receiving_iterator_parallel_execution_halting>
def test_receiving_iterator_parallel_execution_halting(self):
@once.once
def receiving_iterator():
next = yield 0
while next is not None:
next = yield next
def call_iterator(n):
"""Call the iterator but end early"""
gen = receiving_iterator()
result = []
result.append(gen.send(None))
for i in range(1, n):
result.append(gen.send(i))
return result
with concurrent.futures.ThreadPoolExecutor(max_workers=16) as executor:
results = list(executor.map(call_iterator, range(1, 32)))
for i, result in enumerate(results):
> self.assertEqual(result, list(range(i + 1)))
E AssertionError: Lists differ: [0, 1, 2, 3, 4, 5, 4] != [0, 1, 2, 3, 4, 5, 6]
E
E First differing element 6:
E 4
E 6
E
E - [0, 1, 2, 3, 4, 5, 4]
E ? ^
E
E + [0, 1, 2, 3, 4, 5, 6]
E ? ^
once_test.py:519: AssertionError
Loading