From 4571036cf66c539e50625218aeb99a288d79f3e1 Mon Sep 17 00:00:00 2001 From: Nayef Ahmed <22487263+Nayef211@users.noreply.github.com> Date: Wed, 26 Apr 2023 20:00:05 -0400 Subject: [PATCH] Disable test_download_charngram_vectors on Linux CI (#2161) (#2165) --- test/torchtext_unittest/test_build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/torchtext_unittest/test_build.py b/test/torchtext_unittest/test_build.py index ccb875b64..e5ddad486 100644 --- a/test/torchtext_unittest/test_build.py +++ b/test/torchtext_unittest/test_build.py @@ -1,6 +1,8 @@ #!/usr/bin/env python3 """Tests that requires external resources (Network access to fetch dataset)""" import os +import platform +import unittest import torch import torchtext.data @@ -64,6 +66,8 @@ def test_vectors_get_vecs(self) -> None: self.assertEqual(token_one_vec.shape[0], vec.dim) self.assertEqual(vec[tokens[0].lower()], token_one_vec) + # TODO(Nayef211): remove decorator once https://github.com/pytorch/text/issues/1900 is closed + @unittest.skipIf("CI" in os.environ and platform.system() == "Linux", "Test is known to fail on Linux.") @third_party_download def test_download_charngram_vectors(self) -> None: # Build a vocab and get vectors twice to test caching.