def add_entry_test(self):
        """Test MultiDimensionalTimeSeries.add_entry()."""
        data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
        mdts = MultiDimensionalTimeSeries(3)

        for entry in data:
            mdts.add_entry(len(mdts), entry)

        assert len(data) == len(mdts)

        for idx in xrange(len(data)):
            assert [idx] + data[idx] == mdts[idx]
    def add_entry_test(self):
        """Test MultiDimensionalTimeSeries.add_entry()."""
        data = [[1,2,3],[4,5,6],[7,8,9]]
        mdts = MultiDimensionalTimeSeries(3)

        for entry in data:
            mdts.add_entry(len(mdts), entry)

        assert len(data) == len(mdts)
        
        for idx in xrange(len(data)):
            assert [idx] + data[idx] == mdts[idx]
 def add_entry_format_test(self):
     """Test MultiDimensionalTimeSeries.add_entry with string timestamps."""
     mdts = MultiDimensionalTimeSeries(1)
     mdts.set_timeformat("%Y-%m-%d_%H:%M:%S")
     mdts.add_entry("2013-01-15_16:25:00", 42)
     mdts.add_entry("2013-01-15_16:25:00", [42])
 def add_entry_format_test(self):
     """Test MultiDimensionalTimeSeries.add_entry with string timestamps."""
     mdts = MultiDimensionalTimeSeries(1)
     mdts.set_timeformat("%Y-%m-%d_%H:%M:%S")
     mdts.add_entry("2013-01-15_16:25:00", 42)
     mdts.add_entry("2013-01-15_16:25:00", [42])