Releasing Python Packages
When you need to fix a bug, add feature or change existing functionality in a library that you are using there are several ways to do this. Here I will…
When you need to fix a bug, add feature or change existing functionality in a library that you are using there are several ways to do this. Here I will…
Here is a code snippet on how to test open built-in function: Code to test: def my_function(self, id: int) -> None: file_path = ‘path/to/files/{}.txt’.format(id) with open(file_path, ‘w’) as f: f.write(‘< My data…
So lets say we need to write unit test for piece of code that uses __import__ built-in function: def task_we_want_to_test(task_name: str, task_class: str, env: dict) -> Task: module = __import__(…
The naming convention, I propose, have four sections: Story Type: add == Add Feature fix == Fix, Hotfix, Bug, … clean == Cleanup, Chore, … modify == Modify existing functionality Short Summary: 2-3…
This was my first EuroPython conference and I had high expectations because I heard a lot of good things about it. I must say that overall it didn’t let me…
My cheat sheet for postgresql. Also pgcli is a really nice tool to use. IMO with it you don’t need any “phpMyAdmin” tools. Update query: UPDATE blogs SET posts=0, pages=0, plugins=0, health_score=0…
In previous post we look at how basic mocking works and some examples. Today we will see how you can mock dict : post = { “name”: “test”, “content”: “tist”, }…
Before we start writing tests let’s make sure that we understand why do we want to write unit tests and the concept of unit testing. Here are a few reasons (from my…
A few days ago I had a problem where mongodb crashed and I couldn’t start it up. I realized that this problem occurred because the disk was full. So I rm…
When I started using git (several years ago) I use only git command line. After a few years I decided to start using SourceTree. I regret this decision to this…