Skip to content

Instantly share code, notes, and snippets.

@rwcarlsen
Created January 13, 2015 18:07
Show Gist options
  • Save rwcarlsen/39070e5fbb8bd7cafc81 to your computer and use it in GitHub Desktop.
Save rwcarlsen/39070e5fbb8bd7cafc81 to your computer and use it in GitHub Desktop.
class Buffer(object):
def __init__(self):
self.s = ''
def write(self, s):
self.s += s
def test_write_partisan_input(...):
buf = Buffer();
...
write_partisan_input(self, buf, ...)
# check buf.s
...
def write_partisan_input(self, f, geometry, mesh, etc.):
#blablabla
f.write(...)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment