heynemann/pyvows — pull request #66 by Zearin (2013-01-30 15:18:15+00:00)
Title: Assertions: housekeeping, and new assertion (`to_be_a_file`)!

* Cleaned up some redundant names in assertions.
* Added new assertions!
* `to_be_a_file`, or `not_to_be_a_file`…that is the question.

# Rationale for new assertions
I often find myself using files in my vows. I thought I would cover this use case with a couple of new assertions. :)

But…there’s more than one way to check whether something is a “file”. So how to write the assertion?

Well, one of PyVows’ strengths is the convenience of its built-in assertions. The `to_be_like()` assertions are particularly fantastic.

In the spirit of such “fuzzy” assertions, I wrote the new file assertions with a touch of “fuzzy” logic as well. If passed a string, the assertion checks whether the file exists. If passed anything else, the assertion checks whether the topic is an instance of Python’s built-in file type.

I hope it’s useful!