Buckets:
ktongue/OnedriveENISE / ENISE1 /hf_env /lib /python3.14 /site-packages /dill /tests /test_threads.py
| #!/usr/bin/env python | |
| # | |
| # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) | |
| # Copyright (c) 2024-2025 The Uncertainty Quantification Foundation. | |
| # License: 3-clause BSD. The full license text is available at: | |
| # - https://github.com/uqfoundation/dill/blob/master/LICENSE | |
| import dill | |
| dill.settings['recurse'] = True | |
| def test_new_thread(): | |
| import threading | |
| t = threading.Thread() | |
| t_ = dill.copy(t) | |
| assert t.is_alive() == t_.is_alive() | |
| for i in ['daemon','name','ident','native_id']: | |
| if hasattr(t, i): | |
| assert getattr(t, i) == getattr(t_, i) | |
| def test_run_thread(): | |
| import threading | |
| t = threading.Thread() | |
| t.start() | |
| t_ = dill.copy(t) | |
| assert t.is_alive() == t_.is_alive() | |
| for i in ['daemon','name','ident','native_id']: | |
| if hasattr(t, i): | |
| assert getattr(t, i) == getattr(t_, i) | |
| def test_join_thread(): | |
| import threading | |
| t = threading.Thread() | |
| t.start() | |
| t.join() | |
| t_ = dill.copy(t) | |
| assert t.is_alive() == t_.is_alive() | |
| for i in ['daemon','name','ident','native_id']: | |
| if hasattr(t, i): | |
| assert getattr(t, i) == getattr(t_, i) | |
| if __name__ == '__main__': | |
| test_new_thread() | |
| test_run_thread() | |
| test_join_thread() | |
Xet Storage Details
- Size:
- 1.26 kB
- Xet hash:
- 12672fe7d1f863f8cd2a68454414ff8dca02888b857729cf78d63e3eafe4bb40
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.