Testing Python Code Using UnitTest

This page summarizes the projects mentioned and recommended in the original post on dev.to

Sevalla - Deploy and host your apps and databases, now with $50 credit!
Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!
sevalla.com
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. txt-to-HTML-converter

    A conversion tool made for converting txt file to standard HTML.

    Hey everyone, I recently had to create testers for my TXT to HTML Converter program. To do this I used the built-in UnitTest framework, which I'll talk about below.

  2. Sevalla

    Deploy and host your apps and databases, now with $50 credit! Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!

    Sevalla logo
  3. ruff

    An extremely fast Python linter and code formatter, written in Rust.

    It was with this test that I made that I was able to test my parse_md function, previously called check_md_and_write, and locate a bug that I uncovered a last week. I noticed this bug when I was using the linter, Ruff, and formatter, Black, I set up for my project. If you're interested in reading about the linter and formatter I chose and the setup process you can read last week's blog. Essentially the problem was that I could not parse any Markdown in my program. I wasn't sure what the problem was, but I think it had something to do with when I refactored my code and tried to clean things up. Luckily, I still has the branches where I worked on improved the function to parse markdown and the refactoring branch. To make note of it, I made an issue for myself and specified which branches to take a look at.

  4. black

    The uncompromising Python code formatter

    It was with this test that I made that I was able to test my parse_md function, previously called check_md_and_write, and locate a bug that I uncovered a last week. I noticed this bug when I was using the linter, Ruff, and formatter, Black, I set up for my project. If you're interested in reading about the linter and formatter I chose and the setup process you can read last week's blog. Essentially the problem was that I could not parse any Markdown in my program. I wasn't sure what the problem was, but I think it had something to do with when I refactored my code and tried to clean things up. Luckily, I still has the branches where I worked on improved the function to parse markdown and the refactoring branch. To make note of it, I made an issue for myself and specified which branches to take a look at.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • The Power of Pre-Commit for Python Developers: Tips and Best Practices

    3 projects | dev.to | 1 May 2023
  • Is it considered rude to completely change the formatting of someone else's code when making a PR?

    3 projects | /r/cscareerquestions | 12 Apr 2023
  • Ruff: one Python linter to rule them all

    3 projects | /r/Python | 10 Apr 2023
  • How pythonic is enough pythonic?

    2 projects | /r/learnpython | 27 Mar 2022
  • Newbie here: blank spaces for better code readability?

    4 projects | /r/learnpython | 11 Jan 2022

Did you know that Python is
the 2nd most popular programming language
based on number of references?