mirror of https://github.com/pypa/pip
Return SUCCESS from side effect function
This commit is contained in:
parent
4b5f723480
commit
f2fb3610f3
|
@ -159,6 +159,7 @@ def test_base_command_provides_tempdir_helpers():
|
|||
def assert_helpers_set(options, args):
|
||||
assert temp_dir._tempdir_manager is not None
|
||||
assert temp_dir._tempdir_registry is not None
|
||||
return SUCCESS
|
||||
|
||||
c = Command("fake", "fake")
|
||||
c.run = Mock(side_effect=assert_helpers_set)
|
||||
|
@ -183,6 +184,7 @@ def test_base_command_global_tempdir_cleanup(kind, exists):
|
|||
def create_temp_dirs(options, args):
|
||||
c.tempdir_registry.set_delete(not_deleted, False)
|
||||
Holder.value = TempDirectory(kind=kind, globally_managed=True).path
|
||||
return SUCCESS
|
||||
|
||||
c = Command("fake", "fake")
|
||||
c.run = Mock(side_effect=create_temp_dirs)
|
||||
|
@ -206,6 +208,7 @@ def test_base_command_local_tempdir_cleanup(kind, exists):
|
|||
path = d.path
|
||||
assert os.path.exists(path)
|
||||
assert os.path.exists(path) == exists
|
||||
return SUCCESS
|
||||
|
||||
c = Command("fake", "fake")
|
||||
c.run = Mock(side_effect=create_temp_dirs)
|
||||
|
|
Loading…
Reference in New Issue