Subscribe to continue reading
Subscribe to get access to the rest of this post and other subscriber-only content.
25th September, 2023
Subscribe to get access to the rest of this post and other subscriber-only content.
10th April, 2013
python -m unittest discover
…should work fine when you have set everything up with a bit of forethought
If you see response ‘Ran 0 tests’ then try
touch tests/__init__.py
If you fail to create an empty __init__.py in your tests folder, then Python (rightly) will not recognise it [ as a module ]
Rerun your discover command and if missing __init__.py was holding you up, then you should now be further along.
Along the way you have just learned a little about project structure, and Python requirements generally for modularised code.
5th September, 2011
Argument parsing in ANSI C has several helper functions.
The atoi() function is commonly used.
In C99 a new atoll() function was created.
On GNU / Linux systems /usr/bin/c99
will compile your ANSI C to C99 standard.
If you use /usr/bin/c99
and asprintf() function in your code, then you might want to include the following line, just before your include <stdio.h>
#define _GNU_SOURCE
Having that ‘# define’ will help you avoid warnings such as:
warning: implicit declaration of function ‘asprintf’
Links: