dvershinin / lastversion

with statements can be merged PTC-W0062
Anti-pattern
Major
3 months ago3 months old
Consider merging collapsible With statements`
109
110def test_unzip_osx_bundle_strip(capsys):  # pylint: disable=unused-argument
111    """Test that ZIP files with single top level directory are stripped."""
112    with captured_exit_code() as get_exit_code:113        with tempfile.TemporaryDirectory() as tmp_dir_name:
114            # Set the temp directory as the current working directory
115            os.chdir(tmp_dir_name)
Consider merging collapsible With statements`
127
128def test_unzip_osx_bundle(capsys):  # pylint: disable=unused-argument
129    """Test that OSX bundles are unzipped and .app is not stripped."""
130    with captured_exit_code() as get_exit_code:131        with tempfile.TemporaryDirectory() as tmp_dir_name:
132            # Set the temp directory as the current working directory
133            os.chdir(tmp_dir_name)