1. 11 Jun, 2020 1 commit
    • moto's avatar
      Change parameterized testing system to be compatible with unittest (#712) · d2724481
      moto authored
      
      
      * Change parameterized testing system to be compatible with unittest
      
      Summary: The previous implementation of parameterized testing worked by modifying test.common_utils inplace.  This doesn't work in general because unittest's contract with test modules is such that it must be able to load the module and run the test itself.  Because the previous implementation needed to load the module and modify it, it is incompatible.
      
      Reviewed By: mthrok
      
      Differential Revision: D21964676
      Co-authored-by: default avatarBen Mehne <bmehne@fb.com>
      d2724481
  2. 08 Jun, 2020 2 commits
  3. 21 May, 2020 1 commit
  4. 14 May, 2020 1 commit
  5. 08 May, 2020 1 commit
  6. 24 Apr, 2020 1 commit
  7. 22 Apr, 2020 1 commit
  8. 20 Apr, 2020 1 commit
  9. 14 Apr, 2020 1 commit
    • moto's avatar
      Simplify and abstract away asset access in test (#542) · 0e5581cb
      moto authored
      This PR aims the following things;
      1. Introduce and adopt helper function `get_asset_path` that abstract the logic to construct path to test assets.
      2. Remove `create_temp_assets_dir` anywhere except `test_io`.
      
      The benefits of doing so are,
      a. the test code becomes simpler (no manual construction of asset path with `os.path.join`)
      b. No unnecessary directory creation and file copies.
      
      For 2. and b. tests in `test_io.py` (or tests that use `torchaudio.save`) are the only tests that need to write file to the disc, where the use of temporary directory makes it cleaner, therefore, `create_temp_assets_dir` is not necessary elsewhere. (still, `test_io` does not need to copy the entire asset directory, but that's not the point here.)
      
      Also if any test is accidentally overwriting an asset data, not using a copy will make us aware of such behavior, so it is better to get rid of `create_temp_assets_dir`.
      0e5581cb
  10. 13 Apr, 2020 1 commit
  11. 30 Mar, 2020 2 commits
    • Vincent QB's avatar
      testing with sox only when sox is available (#419) · d63d851e
      Vincent QB authored
      * testing with sox only when sox is available.
      
      * use wav instead of mp3 for testing functions.
      
      * typo.
      
      * guard against not sox.
      
      * backends definition.
      
      * grouping backend functions into a separate file.
      
      * remove duplicated code.
      
      * requires sox.
      
      * replace by wav, requires sox.
      
      * require with scope.
      
      * undo alignment.
      
      * requires sox for these two, because of mp3.
      
      * no longer need first mp3.
      
      * cleaning.
      
      * new wav version of file.
      
      * flake8.
      
      * remove unnecessary load.
      
      * flake8.
      
      * lint.
      
      * lint.
      
      * revert formatting of file.
      
      * merging into common_utils.
      
      * docstring.
      
      * rename to common_utils.
      d63d851e
    • moto's avatar
      Remove PY2 related stuff from test (#478) · beb6e530
      moto authored
      beb6e530
  12. 02 Aug, 2019 1 commit
    • Edward Z. Yang's avatar
      Make torchaudio work on Python 2. (#209) · a424509d
      Edward Z. Yang authored
      
      
      - Apply __future__ imports uniformly (future division is the biggy, but absolute
        imports mattered too)
      - Hotfix use of tempfile.TemporaryDirectory using a BC library (DO NOT
        add this library as a dependency to torchaudio; it's only for testing)
      - Replace math.gcd with fractions.gcd
      - Fix a weird pytest collection bug involving parametrized tests
      - Turn on Python 2 and Python 3.7 in Travis.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@fb.com>
      a424509d
  13. 24 Jul, 2019 1 commit
  14. 10 Jul, 2019 1 commit
  15. 24 May, 2019 1 commit