Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class TestGroups(unittest.TestCase):
import Errors
import Query.Errors
class ExampleClass:
def __init__(self, name, frags):
self.Name = name
self.frags = frags
def name(self):
return self.Name
def frags(self):
return self.frags
base = [ExampleClass("[FD]Chasm", 5), ExampleClass("[FD]Oblivion", 5), ExampleClass("|DM|Broski", 3), ExampleClass("|DM|Dannyboy", 3)]
class DynamicBase:
def __init__(self, base):
"""Will expose one more of the given base on each access"""
self.position = 0
self.base = base
def __call__(self):
self.position += 1
return self.base[:self.position]
def testEmptyGroupCreation(self):
emptyGroup = Group(self.ExampleClass)
self.assertEquals(emptyGroup.members(), [])
def testGroupCreation(self):