/opt/imh-python/lib/python3.9/site-packages/dill/tests
NameSizeModeActions
__pycache__/-0755rm
test_abc.py42270644editdlrm
test_check.py13960644editdlrm
test_classdef.py86000644editdlrm
test_dataclasses.py8900644editdlrm
test_detect.py41440644editdlrm
test_dictviews.py13370644editdlrm
test_diff.py26670644editdlrm
test_extendpickle.py13150644editdlrm
test_fglobals.py16760644editdlrm
test_file.py135780644editdlrm
test_functions.py42670644editdlrm
test_functors.py9300644editdlrm
test_logger.py23850644editdlrm
test_mixins.py40070644editdlrm
test_module.py19430644editdlrm
test_moduledict.py11820644editdlrm
test_nested.py31460644editdlrm
test_objects.py19310644editdlrm
test_properties.py13460644editdlrm
test_pycapsule.py14170644editdlrm
test_recursive.py41820644editdlrm
test_registered.py15730644editdlrm
test_restricted.py7830644editdlrm
test_selected.py32580644editdlrm
test_session.py101610644editdlrm
test_source.py70590644editdlrm
test_sources.py86720644editdlrm
test_temp.py26190644editdlrm
test_threads.py12570644editdlrm
test_weakref.py16020644editdlrm
__init__.py4790644editdlrm
__main__.py8990644editdlrm
Edit: /opt/imh-python/lib/python3.9/site-packages/dill/tests/test_moduledict.py (1182B)
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. # Copyright (c) 2016-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 f(func): def w(*args): return f(*args) return w @f def f2(): pass # check when __main__ and on import def test_decorated(): assert dill.pickles(f2) import doctest import logging logging.basicConfig(level=logging.DEBUG) class SomeUnreferencedUnpicklableClass(object): def __reduce__(self): raise Exception unpicklable = SomeUnreferencedUnpicklableClass() # This works fine outside of Doctest: def test_normal(): serialized = dill.dumps(lambda x: x) # should not try to pickle unpicklable object in __globals__ def tests(): """ >>> serialized = dill.dumps(lambda x: x) """ return #print("\n\nRunning Doctest:") def test_doctest(): doctest.testmod() if __name__ == '__main__': test_decorated() test_normal() test_doctest()