Skip to content

Commit

Permalink
[fix] dirty way of still testing binary/unicode raw string when not i…
Browse files Browse the repository at this point in the history
…n python3
  • Loading branch information
Psycojoker committed May 4, 2015
1 parent aebf13e commit 7c61e55
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,17 @@ def test_to_python_unicode_string_node():


def test_to_python_binary_raw_string_node():
red = RedBaron("br'pouet'")
assert red[0].value == "br'pouet'"
assert red[0].to_python() == br'pouet'
if sys.version < '3':
red = RedBaron("br'pouet'")
assert red[0].value == "br'pouet'"
assert red[0].to_python() == eval("br'pouet'")


def test_to_python_unicode_raw_string_node():
red = RedBaron("ur'pouet'")
assert red[0].value == "ur'pouet'"
assert red[0].to_python() == ur'pouet'
if sys.version < '3':
red = RedBaron("ur'pouet'")
assert red[0].value == "ur'pouet'"
assert red[0].to_python() == eval("ur'pouet'")


def test_to_python_tuple_node():
Expand Down

0 comments on commit 7c61e55

Please sign in to comment.