From ecdac123787b96ce6649f0f91da12ea6458cc2b1 Mon Sep 17 00:00:00 2001 From: Palica Date: Tue, 23 Jun 2020 22:35:08 +0200 Subject: Updating liguros repo --- .../objgraph/files/objgraph-3.4.1-tests.patch | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 dev-python/objgraph/files/objgraph-3.4.1-tests.patch (limited to 'dev-python/objgraph/files/objgraph-3.4.1-tests.patch') diff --git a/dev-python/objgraph/files/objgraph-3.4.1-tests.patch b/dev-python/objgraph/files/objgraph-3.4.1-tests.patch new file mode 100644 index 000000000000..d79b78fb88b5 --- /dev/null +++ b/dev-python/objgraph/files/objgraph-3.4.1-tests.patch @@ -0,0 +1,57 @@ +diff --git a/tests.py b/tests.py +index fc2ee7f..d494470 100755 +--- a/tests.py ++++ b/tests.py +@@ -11,6 +11,7 @@ import tempfile + import textwrap + import types + import unittest ++import platform + + # setuptools imports `imp`, which triggers a DeprecationWarning starting with + # Python 3.4 in the middle of my pristine test suite. But if I do the import +@@ -363,7 +364,7 @@ def doctest_get_new_ids_prints(): + ======================================================== + Type Old_ids Current_ids New_ids Count_Deltas + ======================================================== +- list ... ... ... +2 ++ wt ... ... ... +2 + ======================================================== + + """ +@@ -387,7 +388,10 @@ class ByTypeTest(GarbageCollectedMixin, unittest.TestCase): + # 2. the `res` list + # referrers we don't want: + # the ``objects`` list in the now-dead stack frame of objgraph.by_type +- self.assertLessEqual(len(gc.get_referrers(res[0])), 2) ++ if 'pypy' in platform.python_implementation().lower(): ++ self.assertLessEqual(len(gc.get_referrers(res[0])), 3) ++ else: ++ self.assertLessEqual(len(gc.get_referrers(res[0])), 2) + + + class AtAddrsTest(unittest.TestCase): +@@ -439,7 +443,10 @@ class StringRepresentationTest(GarbageCollectedMixin, + obj = MyClass() + with mock.patch.object(obj, 'my_method', + types.MethodType(mock_method, obj)): +- self.assertRegex(objgraph._short_repr(obj.my_method), ' 2, "Python 3 has no unbound methods") + def test_short_repr_unbound_method(self): -- cgit v1.3.1