Skip to content

Commit d1f0d0d

Browse files
committed
DOC: Add fopen()/fclose() to CFFI mock module
1 parent 7ba04e9 commit d1f0d0d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

doc/fake_cffi.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ def cdef(self, _):
1010
pass
1111

1212
def dlopen(self, _):
13-
return FakePortAudio()
13+
return FakeLibrary()
1414

1515

16-
class FakePortAudio(object):
16+
class FakeLibrary(object):
17+
18+
# from portaudio.h:
1719

1820
paFloat32 = paInt32 = paInt24 = paInt16 = paInt8 = paUInt8 = NotImplemented
1921
paFramesPerBufferUnspecified = 0
@@ -23,3 +25,11 @@ def Pa_Initialize(self):
2325

2426
def Pa_Terminate(self):
2527
return 0
28+
29+
# from stdio.h:
30+
31+
def fopen(*args, **kwargs):
32+
return NotImplemented
33+
34+
def fclose(*args):
35+
pass

0 commit comments

Comments
 (0)