# Path: fparser/api.py
# def get_reader(input, isfree=None, isstrict=None, include_dirs = None, source_only = None,
#                ignore_comments = True):
# def parse(input, isfree=None, isstrict=None, include_dirs = None, source_only = None,
#           ignore_comments = True, analyze=True):
# def walk(stmt, depth=-1, _initial_depth = None):


from fparser import api
from __future__ import absolute_import


def test_reproduce_issue():
    source_str = '''\
      subroutine foo
      do 10
 10   continue
      end subroutine
'''
    tree = api.parse(source_str, isfree=False, isstrict=False,
                     ignore_comments=False)
    assert str(tree).strip().split('\n')[1:]=='''
      !      BEGINSOURCE <cStringIO.StringI object at 0x1733ea0> mode=fix90
        SUBROUTINE foo()
          DO 10
 10       CONTINUE

# Path: fparser/api.py
# def get_reader(input, isfree=None, isstrict=None, include_dirs = None, source_only = None,
#                ignore_comments = True):
# def parse(input, isfree=None, isstrict=None, include_dirs = None, source_only = None,
#           ignore_comments = True, analyze=True):
# def walk(stmt, depth=-1, _initial_depth = None):


# Path: fparser/tests/test_issue10.py
from fparser import api

from __future__ import absolute_import


def test_reproduce_issue():
    source_str = '''\
      subroutine foo
      do 10
 10   continue
      end subroutine
'''
    tree = api.parse(source_str, isfree=False, isstrict=False,
                     ignore_comments=False)
    assert str(tree).strip().split('\n')[1:]=='''
      !      BEGINSOURCE <cStringIO.StringI object at 0x1733ea0> mode=fix90
        SUBROUTINE foo()
          DO 10
 10       CONTINUE

        END SUBROUTINE foo