initial creation
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
import pytest
|
||||
import math
|
||||
|
||||
FILE_NAME = 'IDONOTEXIST.txt'
|
||||
|
||||
def test_missing_filename():
|
||||
with pytest.raises(FileNotFoundError): # <1>
|
||||
open(FILE_NAME) # <2>
|
||||
|
||||
def test_list():
|
||||
print()
|
||||
assert (.1 + .2) == pytest.approx(.3) # <3>
|
||||
|
||||
def test_approximate_pi():
|
||||
assert 22 / 7 == pytest.approx(math.pi, .001) # <4>
|
||||
|
||||
Reference in New Issue
Block a user