def __contains__()

in cassette/cassette_library.py [0:0]


    def __contains__(self, cassette_name):
        """Return whether or not the cassette already exists.

        The method first checks if it is already stored in memory. If not, it
        will check if a file supporting the cassette name exists.
        """
        contains = cassette_name in self.data
        if not contains:
            # Check file directory if it exists
            filename = self.generate_path_from_cassette_name(cassette_name)
            contains = os.path.exists(filename)

        self._log_contains(cassette_name, contains)

        return contains