(self, other)
| 1968 | self.name = name |
| 1969 | |
| 1970 | def __eq__(self, other): |
| 1971 | if other in self.seen: |
| 1972 | text = self.seen[other] |
| 1973 | else: |
| 1974 | text = self.seen[other] = other.read() |
| 1975 | other.close() |
| 1976 | if not isinstance(text, str): |
| 1977 | text = text.decode('ascii') |
| 1978 | return self.name == other.name == text |
| 1979 | |
| 1980 | class TestFileTypeR(TempDirMixin, ParserTestCase): |
| 1981 | """Test the FileType option/argument type for reading files""" |