Skip to content

Commit a6f17c0

Browse files
committed
Add test for new assert
1 parent a2b8e0b commit a6f17c0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

axelrod/tests/unit/test_load_data.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pathlib
33
import unittest
44

5-
from axelrod.load_data_ import axl_filename
5+
from axelrod.load_data_ import axl_filename, load_file
66

77

88
class TestLoadData(unittest.TestCase):
@@ -15,3 +15,8 @@ def test_axl_filename(self):
1515
expected_fn = os.path.join(dirname, "../../strategies/titfortat.py")
1616

1717
self.assertTrue(os.path.samefile(actual_fn, expected_fn))
18+
19+
def test_raise_error_if_file_empty(self):
20+
path = pathlib.Path("not/a/file.py")
21+
with self.assertRaises(FileNotFoundError):
22+
load_file(path, ".")

0 commit comments

Comments
 (0)