old_contents: import pytest
  
  @pytest.fixture(scope='session')
  def experiment():
      import matrixscreener
      from os import path
      
      folder = path.join(path.dirname(__file__), 'experiment--test')
      return matrixscreener.Experiment(folder)
  
  
  def test_stitch(tmpdir, experiment):
      "It should stitch images without error."
      well = experiment.wells[0]
      well.stitch(tmpdir.strpath)
  
      # both channels stitched
      assert len(tmpdir.listdir()) == 2
  
  
  def test_looping(experiment):
      for well in experiment.wells:
          for field in well.fields:
              for image in field.images:
                  assert image.filename
  
new_contents: import pytest
  
  @pytest.fixture(scope='session')
  def experiment():
      from matrixscreener.experiment import Experiment
      from os import path
  
      folder = path.join(path.dirname(__file__), 'experiment--test')
      return Experiment(folder)
  
  
  def test_stitch(tmpdir, experiment):
      "It should stitch images without error."
      files = experiment.stitch(tmpdir.strpath)
  
      # both channels stitched
      assert files == tmpdir.listdir()
  
  
  def test_looping(experiment):
      for well in experiment.wells:
          assert type(well) == str
      for field in experiment.fields:
          assert type(field) == str
      for image in experiment.images:
          assert type(image) == str
  
subject: test new experiment