From 6458f2d66f5dcdfece2aeb44a150f2ca81ea3980 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Tue, 15 May 2018 08:35:12 -0700 Subject: [PATCH] Re-enable tests that were stymied by an astor bug --- tests/test_hy2py.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/test_hy2py.py b/tests/test_hy2py.py index f63c123..af3ccab 100644 --- a/tests/test_hy2py.py +++ b/tests/test_hy2py.py @@ -5,7 +5,7 @@ import math, itertools from hy import mangle -from hy._compat import PY36, PY37 +from hy._compat import PY36 def test_direct_import(): @@ -24,8 +24,6 @@ def test_hy2py_import(tmpdir): def assert_stuff(m): - astor_issue101_workaround = PY37 - assert m.mystring == "foofoofoo" assert m.long_string == u"This is a very long string literal, which would surely exceed any limitations on how long a line or a string literal can be. The string literal alone exceeds 256 characters. It also has a character outside the Basic Multilingual Plane: 😂. Here's a double quote: \". Here are some escaped newlines:\n\n\nHere is a literal newline:\nCall me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation. Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people’s hats off—then, I account it high time to get to sea as soon as I can. This is my substitute for pistol and ball. With a philosophical flourish Cato throws himself upon his sword; I quietly take to the ship. There is nothing surprising in this. If they but knew it, almost all men in their degree, some time or other, cherish very nearly the same feelings towards the ocean with me." @@ -91,8 +89,7 @@ def assert_stuff(m): assert m.ran_try_else is True assert type(m.fun) is type(lambda x: x) - if not astor_issue101_workaround: - assert m.fun.__doc__ == "function docstring" + assert m.fun.__doc__ == "function docstring" assert m.funcall1 == [ 1, 2, 3, 4, ("a", "b", "c"), [("k1", "v1"), ("k2", "v2")]] assert m.funcall2 == [ @@ -106,8 +103,7 @@ def assert_stuff(m): class C: pass assert type(m.C1) is type(C) - if not astor_issue101_workaround: - assert m.C2.__doc__ == "class docstring" + assert m.C2.__doc__ == "class docstring" assert issubclass(m.C2, m.C1) assert (m.C2.attr1, m.C2.attr2, m.C2.attr3) == (5, 6, 7)