# Path: burp_reports/lib/check_readme.py
# def check_readme(file='README.rst'):
#     """
#     Checks readme rst file, to ensure it will upload to pypi and be formatted correctly.
#     :param file:
#     :return:
#     """
#     # Get the long description from the relevant file
#     with open(file, encoding='utf-8') as f:
#         readme_content = f.read()
# 
#     errors = list(rstcheck.check(readme_content))
#     if errors:
#         msg = 'There are errors in {}, errors \n {}'.format(file, str(errors[0]))
#         raise SystemExit(msg)
#     else:
#         msg = 'No errors in {}'.format(file)
#         print(msg)


from ..lib.check_readme import check_readme
import os
import pytest


__readme__ = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'README.rst')


def test_check_readme():
    check_readme(__readme__)


def test_check_readme_error():
    __readmef__ = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Readme.rst')
    with pytest.raises(SystemExit):

# Path: burp_reports/lib/check_readme.py
# def check_readme(file='README.rst'):
#     """
#     Checks readme rst file, to ensure it will upload to pypi and be formatted correctly.
#     :param file:
#     :return:
#     """
#     # Get the long description from the relevant file
#     with open(file, encoding='utf-8') as f:
#         readme_content = f.read()
# 
#     errors = list(rstcheck.check(readme_content))
#     if errors:
#         msg = 'There are errors in {}, errors \n {}'.format(file, str(errors[0]))
#         raise SystemExit(msg)
#     else:
#         msg = 'No errors in {}'.format(file)
#         print(msg)


# Path: burp_reports/tests/test_check_readme.py
from ..lib.check_readme import check_readme
import os
import pytest



__readme__ = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'README.rst')


def test_check_readme():
    check_readme(__readme__)


def test_check_readme_error():
    __readmef__ = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Readme.rst')
    with pytest.raises(SystemExit):

        check_readme(__readmef__)