miyuchina / mistletoe

A fast, extensible and spec-compliant Markdown parser in pure Python.
MIT License
791 stars 110 forks source link

Added a unit test for the Scheme renderer. #189

Closed anderskaplan closed 1 year ago

anderskaplan commented 1 year ago

...because it's nice with at least some test coverage.

coveralls commented 1 year ago

Coverage Status

coverage: 94.034% (+2.9%) from 91.086% when pulling 37db9bd5d4e5a0d8f7bc138d7f108488945c6f4d on anderskaplan:scheme-test into 86f3a2f2d6d6289114403bd637fffdd7b543cd62 on miyuchina:master.

pbodnar commented 1 year ago

@anderskaplan, good "catch". And what do you think about removing this section from scheme.py then:

if __name__ == '__main__':
    with Scheme() as renderer:
        prog = ["(define x (* 2 21))",
                "x"]
        print(renderer.render(Program(prog)))

? I think for consistency with other renderers, removing it wouldn't be bad.

anderskaplan commented 1 year ago

@anderskaplan, good "catch". And what do you think about removing this section from scheme.py then:

if __name__ == '__main__':
    with Scheme() as renderer:
        prog = ["(define x (* 2 21))",
                "x"]
        print(renderer.render(Program(prog)))

? I think for consistency with other renderers, removing it wouldn't be bad.

I agree. I'll do that!