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_price_ticks_away(self):
self.assertEqual(utils.price_ticks_away(1.01, 1), 1.02)
self.assertEqual(utils.price_ticks_away(1.01, 5), 1.06)
self.assertEqual(utils.price_ticks_away(500, 1), 510)
self.assertEqual(utils.price_ticks_away(500, -1), 490)
self.assertEqual(utils.price_ticks_away(1.01, -1), 1.01)
self.assertEqual(utils.price_ticks_away(1.10, -10), 1.01)
self.assertEqual(utils.price_ticks_away(1000, 5), 1000)
with self.assertRaises(ValueError):
utils.price_ticks_away(999, -1)
def test_price_ticks_away(self):
self.assertEqual(utils.price_ticks_away(1.01, 1), 1.02)
self.assertEqual(utils.price_ticks_away(1.01, 5), 1.06)
self.assertEqual(utils.price_ticks_away(500, 1), 510)
self.assertEqual(utils.price_ticks_away(500, -1), 490)
self.assertEqual(utils.price_ticks_away(1.01, -1), 1.01)
self.assertEqual(utils.price_ticks_away(1.10, -10), 1.01)
self.assertEqual(utils.price_ticks_away(1000, 5), 1000)
with self.assertRaises(ValueError):
utils.price_ticks_away(999, -1)
def test_price_ticks_away(self):
self.assertEqual(utils.price_ticks_away(1.01, 1), 1.02)
self.assertEqual(utils.price_ticks_away(1.01, 5), 1.06)
self.assertEqual(utils.price_ticks_away(500, 1), 510)
self.assertEqual(utils.price_ticks_away(500, -1), 490)
self.assertEqual(utils.price_ticks_away(1.01, -1), 1.01)
self.assertEqual(utils.price_ticks_away(1.10, -10), 1.01)
self.assertEqual(utils.price_ticks_away(1000, 5), 1000)
with self.assertRaises(ValueError):
utils.price_ticks_away(999, -1)
def test_price_ticks_away(self):
self.assertEqual(utils.price_ticks_away(1.01, 1), 1.02)
self.assertEqual(utils.price_ticks_away(1.01, 5), 1.06)
self.assertEqual(utils.price_ticks_away(500, 1), 510)
self.assertEqual(utils.price_ticks_away(500, -1), 490)
self.assertEqual(utils.price_ticks_away(1.01, -1), 1.01)
self.assertEqual(utils.price_ticks_away(1.10, -10), 1.01)
self.assertEqual(utils.price_ticks_away(1000, 5), 1000)
with self.assertRaises(ValueError):
utils.price_ticks_away(999, -1)
def test_price_ticks_away(self):
self.assertEqual(utils.price_ticks_away(1.01, 1), 1.02)
self.assertEqual(utils.price_ticks_away(1.01, 5), 1.06)
self.assertEqual(utils.price_ticks_away(500, 1), 510)
self.assertEqual(utils.price_ticks_away(500, -1), 490)
self.assertEqual(utils.price_ticks_away(1.01, -1), 1.01)
self.assertEqual(utils.price_ticks_away(1.10, -10), 1.01)
self.assertEqual(utils.price_ticks_away(1000, 5), 1000)
with self.assertRaises(ValueError):
utils.price_ticks_away(999, -1)
def test_price_ticks_away(self):
self.assertEqual(utils.price_ticks_away(1.01, 1), 1.02)
self.assertEqual(utils.price_ticks_away(1.01, 5), 1.06)
self.assertEqual(utils.price_ticks_away(500, 1), 510)
self.assertEqual(utils.price_ticks_away(500, -1), 490)
self.assertEqual(utils.price_ticks_away(1.01, -1), 1.01)
self.assertEqual(utils.price_ticks_away(1.10, -10), 1.01)
self.assertEqual(utils.price_ticks_away(1000, 5), 1000)
with self.assertRaises(ValueError):
utils.price_ticks_away(999, -1)
def test_price_ticks_away(self):
self.assertEqual(utils.price_ticks_away(1.01, 1), 1.02)
self.assertEqual(utils.price_ticks_away(1.01, 5), 1.06)
self.assertEqual(utils.price_ticks_away(500, 1), 510)
self.assertEqual(utils.price_ticks_away(500, -1), 490)
self.assertEqual(utils.price_ticks_away(1.01, -1), 1.01)
self.assertEqual(utils.price_ticks_away(1.10, -10), 1.01)
self.assertEqual(utils.price_ticks_away(1000, 5), 1000)
with self.assertRaises(ValueError):
utils.price_ticks_away(999, -1)
def test_price_ticks_away(self):
self.assertEqual(utils.price_ticks_away(1.01, 1), 1.02)
self.assertEqual(utils.price_ticks_away(1.01, 5), 1.06)
self.assertEqual(utils.price_ticks_away(500, 1), 510)
self.assertEqual(utils.price_ticks_away(500, -1), 490)
self.assertEqual(utils.price_ticks_away(1.01, -1), 1.01)
self.assertEqual(utils.price_ticks_away(1.10, -10), 1.01)
self.assertEqual(utils.price_ticks_away(1000, 5), 1000)
with self.assertRaises(ValueError):
utils.price_ticks_away(999, -1)