Skip to content

Instantly share code, notes, and snippets.

@MGough
Created November 17, 2019 22:04
Show Gist options
  • Save MGough/c0eff7aa71c1a316bffc35cd942c12b6 to your computer and use it in GitHub Desktop.
Save MGough/c0eff7aa71c1a316bffc35cd942c12b6 to your computer and use it in GitHub Desktop.
An abstract class to be used for a unittest.mock example.
from abc import abstractmethod
class SomeClassOutOfOurControl:
@abstractmethod
def add(self, a, b):
raise NotImplementedError("We don't care about this")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment