Fix DeprecationWarnings found when running py.test in Python 2.7 with the -3 flag.
Running through some of my tests with the `-3` flag in python2.7 I encountered some errors within py.test itself. This fixes those errors so we can use py.test in order to identify problems with Python 3.
This commit is contained in:
@@ -52,6 +52,9 @@ class Source(object):
|
||||
return str(self) == other
|
||||
return False
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.lines)
|
||||
|
||||
def __getitem__(self, key):
|
||||
if isinstance(key, int):
|
||||
return self.lines[key]
|
||||
|
||||
Reference in New Issue
Block a user