Our great sponsors
-
You can also follow a simpler approach by just writing down the expected output from the example and comparing your program output to that. Once I get a correct answer, I save that as well so that I can make sure any changes I make to clean up the code don't break my solution. The template I wrote reads an input.something.txt file and checks for an input.something.expected file which contains text like part1: 123\npart2: 456, then prints out a green check mark if my output matches expected or a big red X if I got it wrong.
-
And this is how simple it can be to build some relatively robust tests. All of this lives in a tests folder so pytest automatically finds it in a file called test_day05.py. You can see the file on Github.
-
Scout APM
Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
Related posts
- [All years, all days] Finally got my 350th star ⭐ Mostly in Rust but also Python, Clojure, Haskell, and OCaml
- [2021 All days][Rust] Write-up and thoughts on the 7th edition of Advent of Code
- [2021, all days] [Julia] After having improved my solutions during the last days, I'm happy to share my repository with you! All days combined run in under 750 ms. Every solution is written in Julia.
- -🎄- 2021 Day 22 Solutions -🎄-
- [C#] [.NET] Repo template and library to measure performance