In my last article, I talked about getting back to work on testing the PyMarkdown project. In this article, I talk about taking some time to do things right.


Sometimes, you just need to take some time and get things done right. In the last couple of weeks, I made major modifications to the whitespace tracking system used within the PyMarkdown project. And that brought out some issues. Some of those issues were hiding from before, and some of those are new issues. Both need to be fixed.

Figuring Out What Is Importand To Me

So, that happened. After I rewrote the whitespace tracking system, I added a couple of assert statements to make sure that I did not lose track of those whitespace characters again. And they triggered. I thought I had all combinations put together and tested, but I missed some. The question was, how many other ones did I miss?

As fate would have it, the morning before I was supposed to head over the mountain to visit my relatives, there was a Winter Weather Advisory for the mountains passes that I use to get over there. I talked about going over the mountain with my wife and her father, and we all agreed that safety and sanity were our number one priorities. So, I stayed at home.

Now, I have other stuff I want to get done as well, but I had around three days of “extra” time available to me. How did I want to spend it? I love movies, and I am watching a couple of movies a day, as well as getting caught up on various series. But that only takes up so much time. And I like to be doing stuff that has focus.

Ultimately, I had to figure out what was important for me to accomplish during the period between Christmas Eve Day and New Years Day. I do want to work on getting some other smaller projects ready for publishing, and that is a priority for me. Doing some learning is also a priority, as learning helps me professionally and it also recharges my batteries. But what about the PyMarkdown project?

I am firm that I do not want to spend all my time on the PyMarkdown project, but with the question of “what did I miss?” hanging over my head, I wanted to at least be able to answer that question. More importantly, I want to be able to have a good idea of the scope of the issues, as well as their impact on the project itself.

Making that Decision

With that in mind, I decided to take a solid three days and to add a new level of testing to the PyMarkdown project. It was not going to be an easy three days or a fun three days, but it was something that I felt I needed to do. The way I figured it out in my head, each day was going to be focused on one part of putting the new scenario tests together. Day One was dedicated to simply grunting through the creation of all the test functions with their Markdown. Day Two was dedicated to the painful process of executing every new scenario test and marking each failed test as skipped. Day Three was dedicated to going through the failures and categorizing those failures into categories.

And in case anyone asks, yes, there are that many combinations. To be blunt, the combinations spiral out of control specifically with three features: continuation lines, “collapsed” block quotes, and new list items. While I have yet to add proper testing for new list items, I believe I have decent coverage of the other two features.

Because of continuation lines, I not only have to test:

> > 1. test
> >    me

but I have to test three related scenarios: without the first > character, without the second > character, and without both > characters.

Because of “collapsed” block quotes, I not only have to test:

> > 1. test
> >    me

but I have to test:

>> 1. test
> >    me


> > 1. test
>>    me

And with new list items, it is more that the code I have in place recognizes that a new list item can set a different starting point for any elements that are contained within that list item’s scope.

But in the end, I got it done. It was long. It was arduous. It was painful. But I got it done. Now that I have all those scenario tests and their failures in place, the next thing that I need to do is to start going through them and cleaning up any failures.

And that is what next week is about!

What is Next?

Hopefully, unless my brain falls out through my ears in the meantime, a new year will mean getting a lot of these issues resolved. Stay tuned!

Like this post? Share on: TwitterFacebookEmail


So what do you think? Did I miss something? Is any part unclear? Leave your comments below.


Markdown Linter Beta Bugs


Software Quality


Stay in Touch