Esempio n. 1
0
def test_sample():
    x = list(range(100))
    assert list(debug.sample(x, 10)) == [
        0,
        10,
        20,
        30,
        40,
        50,
        60,
        70,
        80,
        90,
    ]
    x = list(range(91))
    assert list(debug.sample(x, 10)) == [
        0,
        9,
        18,
        27,
        36,
        45,
        54,
        63,
        72,
        81,
    ]
Esempio n. 2
0
def test_sample():
    x = list(range(100))
    assert list(debug.sample(x, 10)) == [
        0, 10, 20, 30, 40, 50, 60, 70, 80, 90,
    ]
    x = list(range(91))
    assert list(debug.sample(x, 10)) == [
        0, 9, 18, 27, 36, 45, 54, 63, 72, 81,
    ]
Esempio n. 3
0
 def test_sample(self):
     x = list(range(100))
     self.assertEqual(
         list(debug.sample(x, 10)),
         [0, 10, 20, 30, 40, 50, 60, 70, 80, 90],
     )
     x = list(range(91))
     self.assertEqual(
         list(debug.sample(x, 10)),
         [0, 9, 18, 27, 36, 45, 54, 63, 72, 81],
     )
Esempio n. 4
0
 def test_sample(self):
     x = list(range(100))
     self.assertEqual(
         list(debug.sample(x, 10)),
         [0, 10, 20, 30, 40, 50, 60, 70, 80, 90],
     )
     x = list(range(91))
     self.assertEqual(
         list(debug.sample(x, 10)),
         [0, 9, 18, 27, 36, 45, 54, 63, 72, 81],
     )