class_docstr: Test transcoding from wav
class_docstr_tok: ["Test","transcoding","from","wav"]
code: def tearDown(self):
      decoder = FileDecoder(self.source)
  
      encoder_cls = get_processor(self.encoder_id)
  
      file_extension = "." + encoder_cls.file_extension()
  
      self.target = tmp_file_sink(
          prefix=self.__class__.__name__, suffix=file_extension
      )
      encoder = encoder_cls(self.target)
      (decoder | encoder).run()
  
      decoder_encoded = FileDecoder(self.target)
  
      pipe = ProcessPipe(decoder_encoded)
      pipe.run()
  
      os.unlink(self.target)
  
      # print decoder.channels(), decoder.samplerate(), written_frames
      # print media_channels
  
      if self.test_channels:
          self.assertEqual(
              decoder.channels(), decoder_encoded.channels()
          )
      else:
          self.assertEqual(
              2, decoder_encoded.channels()
          )  # voaacenc bug ?
  
      self.assertEqual(
          decoder.samplerate(), decoder_encoded.samplerate()
      )
  
      if self.test_duration:
          decoder_input_duration = decoder.input_duration
          if self.source_is_mp3:
              decoder_input_duration -= 0.05
              # sweep.mp3 duration is 8.05s
          self.assertAlmostEqual(
              decoder_input_duration,
              decoder_encoded.input_duration,
              delta=0.1,
          )
  
imports: from __future__ import division
  from timeside.core.processor import get_processor, ProcessPipe
  from timeside.plugins.decoder.aubio import AubioDecoder
  import os
  import unittest
  from unit_timeside import TestRunner
  from tools import tmp_file_sink
  from timeside.core.tools.test_samples import samples
label_desc: Use image node_id 7 for calling the TestTranscodingFromWav obj's underlying member method code with example usage: obj.tearDown() without return types