test/test-cifar.rb in red-datasets-0.0.4 vs test/test-cifar.rb in red-datasets-0.0.5
- old
+ new
@@ -166,10 +166,15 @@
:pixels => [20] * 3072
},
],
raw_dataset)
end
+
+ test("#to_table") do
+ assert_equal([[10] * 3072, [20] * 3072],
+ @dataset.to_table[:pixels])
+ end
end
sub_test_case("test") do
def setup
@dataset = Datasets::CIFAR.new(n_classes: 100, type: :test)
@@ -201,9 +206,14 @@
:data => ([200] * 3072).pack("C*"),
:pixels => [200] * 3072
},
],
raw_dataset)
+ end
+
+ test("#to_table") do
+ assert_equal([[100] * 3072, [200] * 3072],
+ @dataset.to_table[:pixels])
end
end
end
end