Skip to content

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Jul 30, 2019

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: Edward Z. Yang ezyang@fb.com

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: Edward Z. Yang <ezyang@fb.com>
@ezyang ezyang requested review from jamarshon and soumith July 30, 2019 20:25
@jamarshon
Copy link
Contributor

Is there a reason for the test/compliance/init.py

@ezyang
Copy link
Contributor Author

ezyang commented Jul 30, 2019

Yeah, so I can import compliance.blah.

@ezyang ezyang merged commit 07b9b9b into master Jul 30, 2019
@jamarshon jamarshon deleted the pr/standalone-test-scripts branch July 31, 2019 13:23
jamarshon pushed a commit to jamarshon/audio that referenced this pull request Jul 31, 2019
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: Edward Z. Yang <ezyang@fb.com>
(cherry picked from commit 07b9b9b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants