windng
Check-in [27b68805f6]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:pandas.testing.assert_array_equal() is not available anymore.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:27b68805f6b4b7c861f5e169ace05725b3671915
User & Date: goyo 2015-10-19 13:05:48
Original Comment: pandas.testing.assert_array_equal(d, expected) is not available anymore.
Context
2015-10-19
13:30
pandas.TimeSeries is deprecated. Fixes [3d4d407b06]. check-in: 5be8ea71ab user: goyo tags: trunk
13:05
pandas.testing.assert_array_equal() is not available anymore. check-in: 27b68805f6 user: goyo tags: trunk
12:56
get_filepath_or_buffer() now returns compression. check-in: 6a263362aa user: goyo tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/test_wind.py.

145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
        d = wind.period_lenght(p, freq='W')
        self.assertTrue(np.allclose(d, expected))
        d = wind.period_lenght(t, freq='W')
        self.assertTrue(np.allclose(d, expected))

        expected = [28, 31, 30, 31, 30]
        d = wind.period_lenght(p, freq='D')
        pdt.assert_array_equal(d, expected)
        d = wind.period_lenght(t, freq='D')
        pdt.assert_array_equal(d, expected)
        
        expected = [112, 124, 120, 124, 120]
        d = wind.period_lenght(p, freq='6H')
        pdt.assert_array_equal(d, expected)
        d = wind.period_lenght(t, freq='6H')
        pdt.assert_array_equal(d, expected)

        expected = [672, 744, 720, 744, 720]
        d = wind.period_lenght(p, freq='H')
        pdt.assert_array_equal(d, expected)
        d = wind.period_lenght(t, freq='H')
        pdt.assert_array_equal(d, expected)

        expected = [4032, 4464, 4320, 4464, 4320]
        d = wind.period_lenght(p, freq='10T')
        pdt.assert_array_equal(d, expected)
        d = wind.period_lenght(t, freq='10T')
        pdt.assert_array_equal(d, expected)

        expected = [ 12, 12, 12, 12, 12]
        index = pd.date_range('2000-01-01', periods=5, freq='2H')
        d = wind.period_lenght(index, freq='10T')
        pdt.assert_array_equal(d, expected)

    def test_period_lenght_default_freq(self):
        """Test function period_lenght with default value for freq."""
        p = pd.period_range('1999-02-01', periods=5, freq='M')

        d = wind.period_lenght(p)
        expected = [28, 31, 30, 31, 30]







|

|



|

|



|

|



|

|




|







145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
        d = wind.period_lenght(p, freq='W')
        self.assertTrue(np.allclose(d, expected))
        d = wind.period_lenght(t, freq='W')
        self.assertTrue(np.allclose(d, expected))

        expected = [28, 31, 30, 31, 30]
        d = wind.period_lenght(p, freq='D')
        np.testing.assert_array_equal(d, expected)
        d = wind.period_lenght(t, freq='D')
        np.testing.assert_array_equal(d, expected)
        
        expected = [112, 124, 120, 124, 120]
        d = wind.period_lenght(p, freq='6H')
        np.testing.assert_array_equal(d, expected)
        d = wind.period_lenght(t, freq='6H')
        np.testing.assert_array_equal(d, expected)

        expected = [672, 744, 720, 744, 720]
        d = wind.period_lenght(p, freq='H')
        np.testing.assert_array_equal(d, expected)
        d = wind.period_lenght(t, freq='H')
        np.testing.assert_array_equal(d, expected)

        expected = [4032, 4464, 4320, 4464, 4320]
        d = wind.period_lenght(p, freq='10T')
        np.testing.assert_array_equal(d, expected)
        d = wind.period_lenght(t, freq='10T')
        np.testing.assert_array_equal(d, expected)

        expected = [ 12, 12, 12, 12, 12]
        index = pd.date_range('2000-01-01', periods=5, freq='2H')
        d = wind.period_lenght(index, freq='10T')
        np.testing.assert_array_equal(d, expected)

    def test_period_lenght_default_freq(self):
        """Test function period_lenght with default value for freq."""
        p = pd.period_range('1999-02-01', periods=5, freq='M')

        d = wind.period_lenght(p)
        expected = [28, 31, 30, 31, 30]