Bug 995052 - [RFE] Add rlAssertEmpty and rlAssertNotEmpty functions
Summary: [RFE] Add rlAssertEmpty and rlAssertNotEmpty functions
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: beakerlib
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Muller
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-08 13:13 UTC by Filip Holec
Modified: 2016-09-20 02:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-02 15:47:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch adding rlAssertEmpty and rlAssertNotEmpty functions (2.05 KB, patch)
2013-08-08 13:13 UTC, Filip Holec
no flags Details | Diff

Description Filip Holec 2013-08-08 13:13:42 UTC
Created attachment 784348 [details]
Patch adding rlAssertEmpty and rlAssertNotEmpty functions

Description of problem:
I think it would be great if we had beakerlib functions checking if the file
is empty. So far, I've been testing file emptiness manually.

Recently, in one of the php tests, I noticed a comment that stated:
> # -> needs a rlAssertEmpty!

Since I'm not the only one that would appreciate these functions, I decided to
write them.

Version-Release number of selected component (if applicable):
beakerlib-1.8

Comment 1 Petr Muller 2013-08-12 12:35:09 UTC
This does not need to be private

Comment 2 Petr Muller 2013-08-20 11:28:58 UTC
We have decided against adding more trivial (rlRun "[ -s $file ]" does the same thing) asserts to BL in the past.

But I think this is not without merit. rlAssertEmpty is more readable than the above. I'll gather some feedback on the general question of adding more trivial assertions to BL, and then decide how to proceed here.

Comment 3 Petr Muller 2013-12-02 15:47:58 UTC
I'm not convinced the costs (added complexity, learning and maintenance) outweight the benefit. I think it is prone to problems with unusual applications (directories...), fixing which would make it even more complicated and multifaceted. Thus, WONTFIX.


Note You need to log in before you can comment on or make changes to this bug.