mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Remove old py2-specific tests
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
| equals_hash.py:8:5:8:28 | Function Eq.__eq__ | Class $@ implements __eq__ but does not define __hash__. | equals_hash.py:3:1:3:17 | class Eq | Eq |
|
||||
| equals_hash.py:24:5:24:23 | Function Hash.__hash__ | Class $@ implements __hash__ but does not define __eq__ or __cmp__. | equals_hash.py:19:1:19:19 | class Hash | Hash |
|
||||
@@ -1 +0,0 @@
|
||||
Classes/EqualsOrHash.ql
|
||||
@@ -1,2 +0,0 @@
|
||||
| equals_hash.py:8:5:8:28 | Function Eq.__eq__ | Class $@ implements __eq__ but does not implement __ne__. | equals_hash.py:3:1:3:17 | class Eq | Eq |
|
||||
| equals_hash.py:16:5:16:28 | Function Ne.__ne__ | Class $@ implements __ne__ but does not implement __eq__. | equals_hash.py:11:1:11:17 | class Ne | Ne |
|
||||
@@ -1 +0,0 @@
|
||||
Classes/EqualsOrNotEquals.ql
|
||||
@@ -1,63 +0,0 @@
|
||||
#Equals and hash
|
||||
|
||||
class Eq(object):
|
||||
|
||||
def __init__(self, data):
|
||||
self.data = data
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.data == other.data
|
||||
|
||||
class Ne(object):
|
||||
|
||||
def __init__(self, data):
|
||||
self.data = data
|
||||
|
||||
def __ne__(self, other):
|
||||
return self.data != other.data
|
||||
|
||||
class Hash(object):
|
||||
|
||||
def __init__(self, data):
|
||||
self.data = data
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.data)
|
||||
|
||||
class Unhashable1(object):
|
||||
|
||||
__hash__ = None
|
||||
|
||||
|
||||
class EqOK1(Unhashable1):
|
||||
|
||||
def __eq__(self, other):
|
||||
return False
|
||||
|
||||
def __ne__(self, other):
|
||||
return True
|
||||
|
||||
class Unhashable2(object):
|
||||
|
||||
#Not the idiomatic way of doing it, but not uncommon either
|
||||
def __hash__(self):
|
||||
raise TypeError("unhashable object")
|
||||
|
||||
|
||||
class EqOK2(Unhashable2):
|
||||
|
||||
def __eq__(self, other):
|
||||
return False
|
||||
|
||||
def __ne__(self, other):
|
||||
return True
|
||||
|
||||
class ReflectiveNotEquals(object):
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self == other
|
||||
|
||||
class EqOK3(ReflectiveNotEquals, Unhashable1):
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.data == other.data
|
||||
Reference in New Issue
Block a user