class_docstr: In this test suite, the result of file-like object input is compared against file path input,
  because `load` function is rigrously tested for file path inputs to match libsox's result,
class_docstr_tok: ["In","this","test","suite",",","the","result","of","file-like","object","input","is","compared","against","file","path","input",",","because","`","load","`","function","is","rigrously","tested","for","file","path","inputs","to","match","libsox","'s","result",","]
docstr: Loading audio via file object returns the same result as via file path.
docstr_tok: ["Loading","audio","via","file","object","returns","the","same","result","as","via","file","path","."]
code: def test_fileobj(self, ext, kwargs):
      """Loading audio via file object returns the same result as via file path."""
      sample_rate = 16000
      format_ = ext if ext in ["mp3"] else None
      path = self.get_temp_path(f"test.{ext}")
  
      sox_utils.gen_audio_file(
          path, sample_rate, num_channels=2, **kwargs
      )
      expected, _ = self._load(path)
  
      with open(path, "rb") as fileobj:
          found, sr = self._load(fileobj, format=format_)
  
      assert sr == sample_rate
      self.assertEqual(expected, found)
  
imports: import io
  import itertools
  import pathlib
  import tarfile
  from functools import partial
  from parameterized import parameterized
  from torchaudio._backend.ffmpeg import _parse_save_args
  from torchaudio._backend.utils import get_load_func
  from torchaudio._internal import module_utils
  from torchaudio_unittest.backend.dispatcher.sox.common import name_func
  from torchaudio_unittest.common_utils import disabledInCI, get_asset_path, get_wav_data, HttpServerMixin, load_wav, PytorchTestCase, save_wav, skipIfNoExec, skipIfNoFFmpeg, skipIfNoModule, sox_utils, TempDirMixin
  from .save_test import _convert_audio_file
label_desc: Use image node_id 1 for calling the TestFileObject obj's underlying member method code with example usage: obj.test_fileobj(ext, kwargs) without return types