Skip to content

Commit

Permalink
[fix] python3 doesn't have the concept of long anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Psycojoker committed May 4, 2015
1 parent 6e774df commit aebf13e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import pytest
from redbaron import RedBaron

Expand Down Expand Up @@ -57,9 +58,11 @@ def test_to_python_hexa_node():


def test_to_python_long_node():
red = RedBaron("10L")
assert red[0].value == "10L"
assert red[0].to_python() == 10L
# long doesn't exist anymore in python3
if sys.version < '3':
red = RedBaron("10L")
assert red[0].value == "10L"
assert red[0].to_python() == long("10L")


def test_to_python_binary_node():
Expand Down

0 comments on commit aebf13e

Please sign in to comment.