Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_raises_value_error_with_invalid_split(self):
with self.assertRaises(ValueError):
Squad(split='invalid_split')
def test_loads_v2_each_split(self):
train = Squad(split='train', version=2)
self.assertEqual(len(train), 130_319)
dev = Squad(split='dev', version=2)
self.assertEqual(len(dev), 11_873)
def test_loads_v1_each_split(self):
train = Squad(split='train', version=1)
self.assertEqual(len(train), 87_599)
dev = Squad(split='dev', version=1)
self.assertEqual(len(dev), 10_570)
def test_loads_v1_each_split(self):
train = Squad(split='train', version=1)
self.assertEqual(len(train), 87_599)
dev = Squad(split='dev', version=1)
self.assertEqual(len(dev), 10_570)
def test_loads_v2_each_split(self):
train = Squad(split='train', version=2)
self.assertEqual(len(train), 130_319)
dev = Squad(split='dev', version=2)
self.assertEqual(len(dev), 11_873)
def test_raises_value_error_with_invalid_version(self):
with self.assertRaises(ValueError):
Squad(version=3)