import tempfile
import pytest
import photomosaic as pm


@pytest.fixture(scope='module')
def pool():
    pool_dir = tempfile.mkdtemp()
    pm.generate_tile_pool(pool_dir)
    pool = pm.make_pool(pool_dir)

import tempfile
import shutil
import pytest
import photomosaic as pm


@pytest.fixture(scope='module')
def pool():
    tempdirname = tempfile.mkdtemp()
    pm.generate_tile_pool(tempdirname)
    pool = pm.make_pool(tempdirname)
    shutil.rmtree(tempdirname)

Clean up temp pool dir after tests.
TST: Clean up temp pool dir after tests.

  import tempfile
+ import shutil
  import pytest
  import photomosaic as pm
  
  
  @pytest.fixture(scope='module')
  def pool():
-     pool_dir = tempfile.mkdtemp()
+     tempdirname = tempfile.mkdtemp()
-     pm.generate_tile_pool(pool_dir)
+     pm.generate_tile_pool(tempdirname)
-     pool = pm.make_pool(pool_dir)
+     pool = pm.make_pool(tempdirname)
+     shutil.rmtree(tempdirname)
  
Clean up temp pool dir after tests.
## Code Before:
import tempfile
import pytest
import photomosaic as pm


@pytest.fixture(scope='module')
def pool():
    pool_dir = tempfile.mkdtemp()
    pm.generate_tile_pool(pool_dir)
    pool = pm.make_pool(pool_dir)

## Instruction:
Clean up temp pool dir after tests.
## Code After:
import tempfile
import shutil
import pytest
import photomosaic as pm


@pytest.fixture(scope='module')
def pool():
    tempdirname = tempfile.mkdtemp()
    pm.generate_tile_pool(tempdirname)
    pool = pm.make_pool(tempdirname)
    shutil.rmtree(tempdirname)
