Click here to code!

PyBites Twitter Digest - Issue 30, 2018

Posted by PyBites on Sun 23 September 2018 in Digest • Tagged with twitter, news, pybites, pycon, videos, HTTP, OSI Model, coverage, podcast, testing, AI, music, PyTheory, Super Mario Bros, games, unittest, tricks, tips, matplotlib, cryptocurrency, deep learning, Keras, TensorFlow, OpenCV, OCR, machine learning • 2 min read

Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.


Continue reading

All You Need to Know to Start Using Fixtures in Your pytest Code

Posted by Bob on Thu 15 March 2018 in Testing • Tagged with pytest, fixtures, testing, refactoring, pytest-cov, coverage • 11 min read

Setting up test cases for code that manage data can be challenging but it's an important skill to reliably test your code. You might have heard of the setup and teardown methods in unittest. In pytest you use fixtures and as you will discover in this article they are actually not that hard to set up. Fixtures have been labelled pytest's killer feature so let's explore them in this article using a practical example.


Continue reading

Best Practices for Compatible Python 2 and 3 Code

Posted by Bob on Wed 22 March 2017 in Tools • Tagged with 2vs3, tox, six, python-modernize, porting, future, 2to3, coverage, futurize, caniusepython3, pip, Requests, Werkzeug • 3 min read

95% of most popular Python packages support Python 3. Maybe you are lucky and get to start fresh using Python 3. However as of last year Python 2.7 still reigns supreme in pip installs and at a lot of places 2.x is the only version you get to work in. I think writing Python 2 and 3 compatible code is an important skill, so lets check what it entails.


Continue reading