"""
The code this example is all based on is from http://tinyurl.com/pmmnbxv
Some notes on this in the oommf-devnotes repo
"""

import os

os.system('make all')
import example1
def test_f():
    assert example1.f(1) - 1 <= 10 ** -7


def test_myfun():
    assert example1.myfun(example1.f, 2.0) - 4.0 <= 10 ** -7

os.system('make alternate')

import example2


def test2_f():
    assert example2.f(1) - 1 <= 10 ** -7


def test2_myfun():
    assert example2.myfun(example2.f, 2.0) - 4.0 <= 10 ** -7

os.system('make clean')

@@ -132,16 +132,117 @@
 ort os%0A%0A
+import pytest%0A%0A#print(%22pwd:%22)%0A#os.system('pwd')%0A#import subprocess%0A#subprocess.check_output('pwd')%0A%0A%0A
 os.syste
@@ -271,16 +271,18 @@
 xample1%0A
+%0A%0A
 def test
@@ -340,32 +340,170 @@
 f test_myfun():%0A
+    %22%22%22Demonstrate that calling code with wrong object type results%0A    in TypeError exception.%22%22%22%0A    with pytest.raises(TypeError):%0A    
     assert examp

Add pytest.raises for test that fails on purpose.