Skip to content

Instantly share code, notes, and snippets.

@tasdikrahman
tasdikrahman / python_tests_dir_structure.md
Last active May 9, 2024 19:46
Typical Directory structure for python tests

A Typical directory structure for running tests using unittest

Ref : stackoverflow

The best solution in my opinion is to use the unittest [command line interface][1] which will add the directory to the sys.path so you don't have to (done in the TestLoader class).

For example for a directory structure like this:

new_project

├── antigravity.py

<?php
$c = new Client('https://poste.io/admin/api/v1/', 'admin@poste.io', 'admin');
$c->delete('domains/t.com');
$c->post('domains', ['name' => 't.com']);
$c->post('boxes', ['email' => 't@t.com', 'passwordPlaintext' => 't', 'name' => 't']);
$c->patch('boxes/t@t.com', ['name' => 'a', 'disabled' => true, 'passwordPlaintext' => 'a']);