We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2b8e0b commit a6f17c0Copy full SHA for a6f17c0
axelrod/tests/unit/test_load_data.py
@@ -2,7 +2,7 @@
2
import pathlib
3
import unittest
4
5
-from axelrod.load_data_ import axl_filename
+from axelrod.load_data_ import axl_filename, load_file
6
7
8
class TestLoadData(unittest.TestCase):
@@ -15,3 +15,8 @@ def test_axl_filename(self):
15
expected_fn = os.path.join(dirname, "../../strategies/titfortat.py")
16
17
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