AttributeError: 'function' object has no attribute 'ensure'
ionelmc opened this issue · 8 comments
ionelmc commented
I've tried to make a patch but I don't get why all those branches are there. Why is screenshot_dir
recreated in certain conditions?
[gw1] linux2 -- Python 2.7.12 /usr/bin/python2.7
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pytest_splinter/plugin.py", line 522, in _take_screenshot_on_failure
splinter_screenshot_getter_png=splinter_screenshot_getter_png,
File "/usr/local/lib/python2.7/dist-packages/pytest_splinter/plugin.py", line 376, in _take_screenshot
screenshot_dir = session_tmpdir.ensure('screenshots', dir=True).strpath
AttributeError: 'function' object has no attribute 'ensure'
bubenkoff commented
good catch, session_tmpdir needs to be a parameter of that function and passed from the fixture session_tmpdir
which branches do you mean?
bubenkoff commented
try 1.8.4
ionelmc commented
Branches as in if
statements :)
bubenkoff commented
the if is for xdist so when it's on remote node it needs to be created both on remote and local sides
bubenkoff commented
sorry for making mess - 1.8.5 should work
ionelmc commented
@bubenkoff 1.8.5 ain't on pypi yet, upload failed?
bubenkoff commented
sorry again - missed that, now it's there
ionelmc commented
No problem, thanks for the quick fixes :)