From: Amit Bawer <abawer(a)redhat.com>
Current status:
- Py2: Accept command paths in bytes or ascii strings.
- Py3: Accept command paths in unicode/ascii strings only.
---
tests/python_test.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/python_test.py b/tests/python_test.py
index 2d50537..6eb027c 100644
--- a/tests/python_test.py
+++ b/tests/python_test.py
@@ -485,5 +485,10 @@ def test_write_resource_invalid_disk(tmpdir, sanlock_daemon, disk):
disks = [disk]
with pytest.raises(ValueError) as e:
sanlock.write_resource("ls_name", "res_name", disks)
assert repr(disk) in str(e.value)
+(a)pytest.mark.parametrize("filename,encoding", FILE_NAMES)
+def test_killpath(tmpdir, sanlock_daemon, filename, encoding):
+ cmd_path = util.generate_path(tmpdir, filename, encoding)
+ fd = sanlock.register()
+ sanlock.killpath(cmd_path, [cmd_path], fd)
--
2.17.2