Skip to content

Instantly share code, notes, and snippets.

View andres-fr's full-sized avatar

Andres Fernandez andres-fr

View GitHub Profile
@andres-fr
andres-fr / python_interfacing.py
Created October 19, 2017 04:45
This file performs some basic interfacing in Python 2, tested via unittest
"""This file performs some basic interfacing in Python 2:
1. Defining the methods that have to be overriden with the ABC module
2. Defining an input and output signature for those methods
3. Testing the validity of different implementations via unittest
Note the following:
!! In order to check the input/output signatures, the overriden methods have to be run once
at construction, which may be undesirable (usually this kind of interfacing happens within
a protocol that can take care of that).
"""