1. 05 Aug, 2020 1 commit
    • moto's avatar
      [CI] Run unit test with non-editable installation (#845) · 9ba02d5b
      moto authored
      We have been running unit test with editable installation. (i.e. `python setup.py develop`), with which we missed issues like #842. 
      
      This CC makes installation in CI non-editable, and change test directory structure so that the source code will not shadow the installed version of `torchaudio`. With simple `pytest test`, `pytest` modifies `sys.path` and prepend checked out repository, which shadows the installed version.
      
      To remedy this, the whole test suites has been moved from `./test` to `./test/torchaudio_unittest`. This adds nice module structure to our test code and we can do absolute import in each test module, which makes it possible again to run test with `python -m unittest torchaudio_unittest/XXX.py`
      
      This change does not affect the regular development process (`python setup.py develop` && `pytest test`)
      9ba02d5b
  2. 27 May, 2020 1 commit
  3. 30 Jul, 2019 1 commit
    • Edward Z. Yang's avatar
      Make test scripts runnable without being modules. (#186) · 07b9b9ba
      Edward Z. Yang authored
      
      
      This makes it easier to test against an installed wheel, as the
      torchaudio folder is no longer preferentially picked up when
      you run a test module.
      
      I had to move all tests in subfolders into the top level test
      directory to make this work, since you can't access .. modules
      without mucking around with sys.path (which I don't want to do.)
      
      NB: this BREAKS the syntax where you can run a test by
      saying `python -m test.test`.  Instead, do `python test/test.py`
      or use the pytest runner.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@fb.com>
      07b9b9ba
  4. 25 Dec, 2018 1 commit