python-libcst/skip_failing_test.patch
Matej Cepl d7f17cf2e5 Accepting request 860001 from home:bnavigator:branches:devel:languages:python
- Update to version 0.3.16
  Added
  * Support PEP-604 style unions in decorator annotations #429
  * Gathering exports in augmented assignment statements #426
  Fixed
  * Don't allow out of order accesses in the global scope #431
  * Handle scope ordering in For statements #430
  * Fix for not parsing subscripts such as cast()["from"] #428
  * Walrus operator's left hand side now has STORE expression 
    context #433
- Changes in 0.3.15
  Added
  * Support Named Unicode Characters and yield in f-strings #424
  Fixed
  * Assignment/access ordering in comprehensions #423
  * Referencing of remaining objects in cast() #422 
- refresh skip_failing_test.patch

OBS-URL: https://build.opensuse.org/request/show/860001
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libcst?expand=0&rev=10
2021-01-03 22:55:21 +00:00

45 lines
1.4 KiB
Diff

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 @@
import sys
+from sys import maxsize
from textwrap import dedent
from typing import Mapping, Tuple, cast
@@ -24,8 +25,9 @@ from libcst.metadata.scope_provider impo
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,)
@@ -1365,6 +1367,7 @@ class ScopeProviderTest(UnitTest):
}
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(
"""
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
@@ -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"