<s> import busbus <EOL> import os <EOL> import pytest <EOL> import tempfile <EOL> def test_engine_busbus_dir_exists ( ) : <EOL> dir = tempfile . mkdtemp ( ) <EOL> engine = busbus . Engine ( { '<STR_LIT>' : dir } ) <EOL> os . rmdir ( dir ) <EOL> def test_engine_busbus_dir_other_error ( ) : <EOL> outerdir = tempfile . mkdtemp ( ) <EOL> dir = os . path . join ( outerdir , '<STR_LIT>' ) <EOL> os . mkdir ( dir ) <EOL> old_mode = os . stat ( outerdir ) . st_mode <EOL> os . chmod ( outerdir , int ( '<STR_LIT>' , <NUM_LIT:8> ) ) <EOL> with pytest . raises ( OSError ) : <EOL> engine = busbus . Engine ( { '<STR_LIT>' : dir } ) <EOL> os . chmod ( outerdir , old_mode ) <EOL> os . rmdir ( dir ) <EOL> os . rmdir ( outerdir ) </s>
