assert_non_empty_file

Assert File Is Non-Empty

Checks that a regular file exists and contains at least one byte.

Parameters

Returns

True if the file exists and is non-empty.

Examples

assert_non_empty_file("output.csv")
assert_non_empty_file("plot.png", "plot was not written")

See Also

assert_size_of_file, assert_file_exists