changeset 240:97f35d586727

more test. Are we wanting to limit the size of minibatch to the size of the dataset?
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Thu, 29 May 2008 10:42:29 -0400
parents 77b362a23f8e
children ef70a665aaaf
files test_dataset.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test_dataset.py	Thu May 29 10:41:35 2008 -0400
+++ b/test_dataset.py	Thu May 29 10:42:29 2008 -0400
@@ -226,6 +226,9 @@
     assert i==m.n_batches*m.minibatch_size
     del x,y,i,id
 
+    #@todo: we can't do minibatch bigger then the size of the dataset???
+    assert have_raised2(ds.minibatches,['x','y'],n_batches=1,minibatch_size=len(array)+1,offset=0)
+    assert not have_raised2(ds.minibatches,['x','y'],n_batches=1,minibatch_size=len(array),offset=0)
 
 def test_ds_iterator(array,iterator1,iterator2,iterator3):
     l=len(iterator1)