Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

unittest2

Why are unittest2 methods camelCase if names_with_underscores are preferred?

December 6, 2023 by Tarik

From unittest2 website: unittest2 is a backport of the new features added to the unittest testing framework in Python 2.7. It is tested to run on Python 2.4 – 2.7. To use unittest2 instead of unittest simply replace import unittest with import unittest2. Its a bit confusing as from a version 2 is not expected … Read more

Categories python Tags pep8, python, unittest2 Leave a comment

`python -m unittest discover` does not discover tests

March 23, 2023 by Tarik

The behaviour is intentional, but the documentation could make this clearer. If you look at the first paragraph in the test discovery section, it says: For a project’s tests to be compatible with test discovery they must all be importable from the top level directory of the project (in other words, they must all be … Read more

Categories python Tags nose, python, unit-testing, unittest2 Leave a comment

How to run unittest discover from “python setup.py test”?

January 28, 2023 by Tarik

If you use py27+ or py32+, the solution is pretty simple: test_suite=”tests”,

Categories python Tags nose, pytest, python, unit-testing, unittest2 Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa