1
0
Fork 0
mirror of synced 2024-12-21 21:51:08 -05:00
dotbot/tests
Kurt McKee 33f5390a62
Stop patches in the reverse order they were started
Because some functions are patched twice (like `os.rename()`),
stopping the patches in the same order they were started
can result in restoration of one of the patches.

For example:

```
fn = os.rename

# Patch nesting order: 1 then 2
os.rename = patch_1(fn)
os.rename = patch_2(patch_1(fn))

# Unpatch 1 then 2: A still-patched function is restored
os.rename = fn
os.rename = patch_1(fn)

# Unpatch 2 then 1: The original function is restored
os.rename = patch_1(fn)
os.rename = fn
```

Fixes #365
2024-12-18 08:31:31 -06:00
..
conftest.py Stop patches in the reverse order they were started 2024-12-18 08:31:31 -06:00
dotbot_plugin_context_plugin.py Make set of plugins available in context 2024-12-07 18:24:32 -05:00
dotbot_plugin_directory.py Add isort as a tox environment, and run it 2022-05-13 10:44:29 -05:00
dotbot_plugin_dispatcher_no_plugins.py Make Dispatcher have all plugins by default 2024-12-08 18:15:08 -05:00
dotbot_plugin_file.py Add isort as a tox environment, and run it 2022-05-13 10:44:29 -05:00
dotbot_plugin_issue_357.py Fix issue with duplicate execution of plugins 2024-12-07 18:34:56 -05:00
test_bin_dotbot.py Drop support for Python 2 and Python < 3.6 2023-09-09 20:57:01 -04:00
test_clean.py Enforce platform-specific CPython version requirements for Windows in tox 2022-05-13 10:44:29 -05:00
test_cli.py Make Dispatcher have all plugins by default 2024-12-08 18:15:08 -05:00
test_config.py Migrate config-* tests to Python 2022-05-13 10:44:29 -05:00
test_create.py Add black as tox environment, and run it 2022-05-13 10:44:29 -05:00
test_link.py Drop support for Python 2 and Python < 3.6 2023-09-09 20:57:01 -04:00
test_noop.py Add a test framework for all supported Python versions 2022-05-13 10:44:29 -05:00
test_shell.py Resolve merge conflicts 2022-12-16 13:52:33 -06:00
test_shim.py Drop support for Python 2 and Python < 3.6 2023-09-09 20:57:01 -04:00