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 October 31, 2024 10:03
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 June 16, 2024 14:31
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;