old_contents: """
  Copyright (c) 2017, Michael Sonntag (sonntag@bio.lmu.de)
  
  All rights reserved.
  
  Redistribution and use in source and binary forms, with or without
  modification, are permitted under the terms of the BSD License. See
  LICENSE file in the root of the project.
  """
  
  import os
  import shutil
  import tempfile
  import unittest
  import uuid
  
  
  class RenameTest(unittest.TestCase):
      def setUp(self):
          dir_name = "bren_%s" % str(uuid.uuid1())
          self.tmpdir = os.path.join(tempfile.gettempdir(), dir_name)
          if not os.path.isdir(self.tmpdir):
              os.makedirs(self.tmpdir)
          for i in range(0, 3):
              tmp_file = "tmpfile_%s.jpg" % i
              open(os.path.join(self.tmpdir, tmp_file), 'a').close()
  
      def tearDown(self):
          shutil.rmtree(self.tmpdir)
  
      def test_tmp_files(self):
          self.assertEqual(len(os.listdir(self.tmpdir)), 3)
  
new_contents: """
  Copyright (c) 2017, Michael Sonntag (sonntag@bio.lmu.de)
  
  All rights reserved.
  
  Redistribution and use in source and binary forms, with or without
  modification, are permitted under the terms of the BSD License. See
  LICENSE file in the root of the project.
  """
  
  import os
  import shutil
  import tempfile
  import unittest
  import uuid
  
  
  class RenameTest(unittest.TestCase):
      def setUp(self):
          dir_name = "bren_%s" % str(uuid.uuid1())
          self.tmpdir = os.path.join(tempfile.gettempdir(), dir_name)
          if not os.path.isdir(self.tmpdir):
              os.makedirs(self.tmpdir)
          for i in range(0, 3):
              tmp_file = "tmpfile_%s.jpg" % i
              open(os.path.join(self.tmpdir, tmp_file), 'a').close()
  
      def tearDown(self):
          shutil.rmtree(self.tmpdir)
  
      def test_tmp_files(self):
          self.assertEqual(len(os.listdir(self.tmpdir)), 3)
          self.assertEqual(len(os.listdir(self.tmpdir)), 4)
  
subject: Check failing test