Remove old tests

This commit is contained in:
Joe Farebrother
2025-07-15 09:50:21 +01:00
parent 0f04a8b2c0
commit 15115f50c1
6 changed files with 0 additions and 77 deletions

View File

@@ -1 +0,0 @@
| equals_hash.py:24:5:24:23 | Function Hash.__hash__ | Class $@ implements __hash__ but does not define __eq__. | equals_hash.py:19:1:19:19 | class Hash | Hash |

View File

@@ -1 +0,0 @@
Classes/EqualsOrHash.ql

View File

@@ -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

View File

@@ -1 +0,0 @@
| test.py:9:5:9:28 | Function NotOK2.__ne__ | Class $@ implements __ne__ but does not implement __eq__. | test.py:7:1:7:13 | class NotOK2 | NotOK2 |

View File

@@ -1 +0,0 @@
Classes/EqualsOrNotEquals.ql

View File

@@ -1,10 +0,0 @@
class OK:
def __eq__(self, other):
return False
class NotOK2:
def __ne__(self, other):
return True