Merge lp:~sylvain-pineau/checkbox-editor/xls_test_export into lp:checkbox-editor
Proposed by
Sylvain Pineau
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Javier Collado | ||||
Approved revision: | 138 | ||||
Merged at revision: | 140 | ||||
Proposed branch: | lp:~sylvain-pineau/checkbox-editor/xls_test_export | ||||
Merge into: | lp:checkbox-editor | ||||
Diff against target: |
256 lines (+191/-2) 5 files modified
checkbox_editor/_testplanxls.pl (+156/-0) checkbox_editor/data.py (+30/-1) checkbox_editor/editor.py (+1/-0) debian/control (+3/-1) setup.py (+1/-0) |
||||
To merge this branch: | bzr merge lp:~sylvain-pineau/checkbox-editor/xls_test_export | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sylvain Pineau (community) | Needs Resubmitting | ||
Javier Collado (community) | Needs Fixing | ||
Review via email:
|
Description of the change
This change allows XLS compatible output for test procedure in addition of the existing TXT and HTML formats.
Internally, test tree is exported as a json file in a temp file then a perl script performs the full export thanks to the Spreadsheet:
Dependencies have been added to the control file and setup.py modified to install the perl script.
To post a comment you must log in.
Sylvain, thanks for this merge proposal. Since I haven't found yet the perfect python library for writing xls files, let's go with the perl code.
Let me make a couple of comments: s.pl: This isn't a good path (it ends up in /usr/bin after package installation). Could you use something under /usr/share/ checkbox- editor or under the python package directory (look at the glade files for example)?
* bin/_testplanxl
* f.close isn't needed. Since you're opening using the with statement to create a context manager, the file will be closed automatically.
* os.close and os.remove are fine, but maybe you can get rid of those lines also if you use tempfile. NamedTemporaryF ile in the with statement instead of open. What do you think about this?
* Could you use subprocess instead of pexpect? I know pexpect works better for some use cases, but but I prefer not to add a new dependency (by the way, python-pexpect is missing in the debian/control file) if that's not really needed.