Ewoud Kohl van Wijngaarden has uploaded a new change for review.
Change subject: Add unit tests to lsblk ......................................................................
Add unit tests to lsblk
Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 --- A tests/vdsm/test_lsblk.py 1 file changed, 45 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/2840/1 -- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl
Mark Wu has posted comments on this change.
Change subject: Add unit tests to lsblk ......................................................................
Patch Set 2: Fails; I would prefer that you didn't submit this
It fails with the following messages. ERROR: test__parseLsBlk (tests.vdsm.test_lsblk.TestLsBlk) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/mark/Work/vdsm/vdsm-src/tests/vdsm/test_lsblk.py", line 43, in test__parseLsBlk self.assertDictEqual(expected, blkDict) AttributeError: 'TestLsBlk' object has no attribute 'assertDictEqual'
After change unittest to unittest2, it can pass.
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Ewoud Kohl van Wijngaarden has posted comments on this change.
Change subject: Add unit tests to lsblk ......................................................................
Patch Set 2:
Ah, I see the difference between python 2.6 and 2.7. I'll change this and upload a new version when http://gerrit.ovirt.org/#change,2839 gets a more final shape.
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: Add unit tests to lsblk ......................................................................
Patch Set 2: I would prefer that you didn't submit this
Could you please rebase this on top of Saggi's grand node-based unittests?
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Ewoud Kohl van Wijngaarden has posted comments on this change.
Change subject: Add unit tests to lsblk ......................................................................
Patch Set 3:
Now it uses and checks for unittest2. Rebased it on another patch which adds the python module checks. That patch is based on current master.
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: Add unit tests to lsblk ......................................................................
Patch Set 3: I would prefer that you didn't submit this
Is there any reason not to use here the new "nose" framework?
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Ewoud Kohl van Wijngaarden has posted comments on this change.
Change subject: Add unit tests to lsblk ......................................................................
Patch Set 4: I would prefer that you didn't submit this
That I didn't look properly at the nose integration ;)
Now that I've pushed it I forgot to check python 2.6 compatibility which I'll do after lunch.
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Ewoud Kohl van Wijngaarden has posted comments on this change.
Change subject: Add unit tests to lsblk ......................................................................
Patch Set 5:
Sorry it's taken so long, but the problem was using assertDictEqual. With python 2.6 that means you must use unittest2 while nose is focused on plain unittest. Due to a lack of time I couldn't really look into it.
Turns out assertDictEqual is nothing more than a nice textual wrapper around it. I've added a compatibility function to testrunner which prefers the real assertDictEqual, but falls back to assertEqual.
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com
Saggi Mizrahi has posted comments on this change.
Change subject: Add unit tests to lsblk ......................................................................
Patch Set 5: I would prefer that you didn't submit this
assertEquals() already works with dictionaries
Traceback (most recent call last): File "/home/smizrahi/projects/vdsm/tests/ioprocessTests.py", line 484, in testDic self.assertEquals({1:2, 3:4}, {1:2, 3:5}) AssertionError: {1: 2, 3: 4} != {1: 2, 3: 5} - {1: 2, 3: 4} ? ^
+ {1: 2, 3: 5} ? ^
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com
Yeela Kaplan has posted comments on this change.
Change subject: Add unit tests to lsblk ......................................................................
Patch Set 5: Verified; I would prefer that you didn't submit this
Looks good, but need to change the assert like Saggi said.
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com
Ewoud Kohl van Wijngaarden has posted comments on this change.
Change subject: Add unit tests to lsblk ......................................................................
Patch Set 6:
assertDictEqual handles larger dicts better than assertEqual, but since this isn't that large I don't mind using assertEqual.
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Add unit tests to lsblk ......................................................................
Patch Set 6: Verified; Looks good to me, approved
Thanks!
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Add unit tests to lsblk ......................................................................
Add unit tests to lsblk
Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Signed-off-by: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl --- M tests/Makefile.am A tests/lsblkTests.py 2 files changed, 44 insertions(+), 0 deletions(-)
Approvals: Dan Kenigsberg: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/2840 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I9129e90a4bcb78929810c6f069dfb5b839af01d3 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com
vdsm-patches@lists.fedorahosted.org