Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate tests which require external resource #783

Merged
merged 15 commits into from
May 19, 2020

Conversation

mthrok
Copy link
Contributor

@mthrok mthrok commented May 19, 2020

Tests that require dataset (either via network access or cache) as following are moved to test/test_build.py.

test_vocab_vectors_custom_cache (test.test_vocab.TestVocab)
test_vocab_extend (test.test_vocab.TestVocab)
test_vocab_download_glove_vectors (test.test_vocab.TestVocab)
test_vocab_download_fasttext_vectors (test.test_vocab.TestVocab)
test_vocab_download_custom_vectors (test.test_vocab.TestVocab)
test_vocab_download_charngram_vectors (test.test_vocab.TestVocab)
test_vectors_get_vecs (test.test_vocab.TestVocab)
test_get_tokenizer_spacy (test.data.test_utils.TestUtils)
test_json_dataset_one_key_multiple_fields (test.data.test_dataset.TestDataset)
test_csv_file_no_header_one_col_multiple_fields (test.data.test_dataset.TestDataset)
test_build_vocab (test.data.test_field.TestNestedField)

In addition to that, the following test modules contain only such tests. so they can simply exclude in fbcode.

  • test/test_utils.py (unchanged)
  • test/data/test_subword.py (unchanged)

@mthrok mthrok marked this pull request as ready for review May 19, 2020 19:40
Copy link
Contributor

@zhangguanheng66 zhangguanheng66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this PR consolidates the tests that require external resource into test_build.py. However, why there are some tests missing? For example, test_vocab_download_fasttext_vectors, test_vocab_extend etc?

@mthrok
Copy link
Contributor Author

mthrok commented May 19, 2020

They are not missing. I omitted _vocab_ from the original test names because it was redundant. Search download_fasttext_vectors or test_extend

Copy link
Contributor

@zhangguanheng66 zhangguanheng66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me!

@mthrok mthrok merged commit 2cab8fb into pytorch:master May 19, 2020
@mthrok mthrok deleted the separate-test branch May 19, 2020 20:38
@mthrok
Copy link
Contributor Author

mthrok commented May 19, 2020

Thanks!

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.

None yet

2 participants