Exemplo n.º 1
0
 def test_make_compact(self):
     assert nxt.make_compact(["d", "d", "d", "i", "d", "d"]) == [3, 1, 2]
     assert nxt.make_compact([3, 1, 2]) == [3, 1, 2]
     assert pytest.raises(TypeError, nxt.make_compact, [3.0, 1.0, 2.0])
Exemplo n.º 2
0
 def test_make_compact(self):
     assert_equal(nxt.make_compact(['d', 'd', 'd', 'i', 'd', 'd']), [3, 1, 2])
     assert_equal(nxt.make_compact([3, 1, 2]), [3, 1, 2])
     assert_raises(TypeError, nxt.make_compact, [3., 1., 2.])
Exemplo n.º 3
0
 def test_make_compact(self):
     assert_equal(nxt.make_compact(['d', 'd', 'd', 'i', 'd', 'd']), [3, 1, 2])
     assert_equal(nxt.make_compact([3, 1, 2]), [3, 1, 2])
     assert_raises(TypeError, nxt.make_compact, [3., 1., 2.])
Exemplo n.º 4
0
 def test_make_compact(self):
     assert nxt.make_compact(['d', 'd', 'd', 'i', 'd', 'd']) == [3, 1, 2]
     assert nxt.make_compact([3, 1, 2]) == [3, 1, 2]
     assert pytest.raises(TypeError, nxt.make_compact, [3., 1., 2.])