# 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_private():
    source_str = '''
    module m
    contains
    subroutine a
    end subroutine a
    end module m
    '''
    tree = api.parse(source_str, isfree=True, isstrict=False)

def test_private_subroutine():
    source_str = '''
    module m
    public
    private a
    contains
    subroutine a
    end subroutine a
    subroutine b
    end subroutine b
    end module m
    '''

# 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_issue4.py
from fparser import api

from __future__ import absolute_import


def test_reproduce_issue_private():
    source_str = '''
    module m
    contains
    subroutine a
    end subroutine a
    end module m
    '''
    tree = api.parse(source_str, isfree=True, isstrict=False)

def test_private_subroutine():
    source_str = '''
    module m
    public
    private a
    contains
    subroutine a
    end subroutine a
    subroutine b
    end subroutine b
    end module m
    '''

    tree = api.parse(source_str, isfree=True, isstrict=False)