Skip to content

Instantly share code, notes, and snippets.

View chponte's full-sized avatar

Christian Ponte Fernández chponte

  • NetApp
  • Cork, Ireland
View GitHub Profile
@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

@beached
beached / bare_asio_server.cpp
Last active April 11, 2024 14:34
A barebones async server with Boost ASIO
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <cstdint>
#include <iostream>
#include <list>
#include <memory>
struct Connection {
boost::asio::ip::tcp::socket socket;
boost::asio::streambuf read_buffer;