2021-01-03 22:55:21 +00:00
|
|
|
Index: libcst-0.3.16/libcst/metadata/tests/test_scope_provider.py
|
|
|
|
===================================================================
|
|
|
|
--- libcst-0.3.16.orig/libcst/metadata/tests/test_scope_provider.py
|
|
|
|
+++ libcst-0.3.16/libcst/metadata/tests/test_scope_provider.py
|
|
|
|
@@ -5,6 +5,7 @@
|
2021-01-03 16:40:17 +00:00
|
|
|
|
|
|
|
|
2021-01-03 22:55:21 +00:00
|
|
|
import sys
|
2021-01-03 16:40:17 +00:00
|
|
|
+from sys import maxsize
|
|
|
|
from textwrap import dedent
|
|
|
|
from typing import Mapping, Tuple, cast
|
|
|
|
|
2021-01-03 22:55:21 +00:00
|
|
|
@@ -24,8 +25,9 @@ from libcst.metadata.scope_provider impo
|
2021-01-03 16:40:17 +00:00
|
|
|
ScopeProvider,
|
|
|
|
_gen_dotted_names,
|
|
|
|
)
|
|
|
|
-from libcst.testing.utils import UnitTest, data_provider
|
|
|
|
+from libcst.testing.utils import UnitTest, skipUnless, data_provider
|
|
|
|
|
|
|
|
+is_64bits = maxsize > 2**32
|
|
|
|
|
|
|
|
class DependentVisitor(cst.CSTVisitor):
|
|
|
|
METADATA_DEPENDENCIES = (ScopeProvider,)
|
2021-01-03 22:55:21 +00:00
|
|
|
@@ -1365,6 +1367,7 @@ class ScopeProviderTest(UnitTest):
|
2021-01-03 16:40:17 +00:00
|
|
|
}
|
|
|
|
self.assertEqual(names, {"a.b.c", "a.b", "a"})
|
|
|
|
|
|
|
|
+ @skipUnless(is_64bits, "Doesn't work on 32bit platforms")
|
|
|
|
def test_ordering(self) -> None:
|
|
|
|
m, scopes = get_scope_metadata_provider(
|
|
|
|
"""
|
2021-01-03 22:55:21 +00:00
|
|
|
Index: libcst-0.3.16/libcst/testing/utils.py
|
|
|
|
===================================================================
|
|
|
|
--- libcst-0.3.16.orig/libcst/testing/utils.py
|
|
|
|
+++ libcst-0.3.16/libcst/testing/utils.py
|
2021-01-03 16:40:17 +00:00
|
|
|
@@ -20,7 +20,7 @@ from typing import (
|
|
|
|
TypeVar,
|
|
|
|
Union,
|
|
|
|
)
|
|
|
|
-from unittest import TestCase
|
|
|
|
+from unittest import TestCase, skipUnless
|
|
|
|
|
|
|
|
|
|
|
|
DATA_PROVIDER_DATA_ATTR_NAME = "__data_provider_data"
|