sciunto-org / python-bibtexparser

Bibtex parser for Python 3
https://bibtexparser.readthedocs.io
MIT License
474 stars 132 forks source link

:bug: Handle `None` and Collections in BlockMiddleware.transformBlock #387

Closed mlutze closed 1 year ago

mlutze commented 1 year ago

This fixes #386.

For the tests I stole the sample blocks from test_sorting_blocks.py.

mlutze commented 1 year ago

@MiWeiss Is there anything more needed before this can be merged?

MiWeiss commented 1 year ago

Please apologize my delay, I had not noticed the PR previously. Will try to do a review within the next couple of days.

Thanks already for opening the PR :rocket:

MiWeiss commented 1 year ago

Great, thanks!

I guess the three new test cases could be refactored into a single @pytest.mark.parameterized test function, thus keeping the test suite simpler to read and maintain. Or am I missing something?

Would you mind doing this refactoring? Otherwise I can take care of it.

Afterwards, this will be ready to be merged...

MiWeiss commented 1 year ago

Thanks a lot @mlutze for the PR. Nice work!