Skip to content

Commit 817ae30

Browse files
sinhrkscldy
authored andcommitted
CLN: Remove testing._skip_if_no_cday
NumPy 1.7 or later supports custom business day. Author: sinhrks <[email protected]> Closes pandas-dev#12249 from sinhrks/cday_cln and squashes the following commits: 5a819ac [sinhrks] CLN: Remove testing._skip_if_no_cday
1 parent e57fd92 commit 817ae30

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

pandas/tseries/tests/test_daterange.py

-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def test_generate(self):
3030
self.assert_numpy_array_equal(rng1, rng2)
3131

3232
def test_generate_cday(self):
33-
tm._skip_if_no_cday()
3433
rng1 = list(generate_range(START, END, offset=datetools.cday))
3534
rng2 = list(generate_range(START, END, time_rule='C'))
3635
self.assert_numpy_array_equal(rng1, rng2)
@@ -546,7 +545,6 @@ def test_freq_divides_end_in_nanos(self):
546545

547546
class TestCustomDateRange(tm.TestCase):
548547
def setUp(self):
549-
tm._skip_if_no_cday()
550548
self.rng = cdate_range(START, END)
551549

552550
def test_constructor(self):

pandas/tseries/tests/test_offsets.py

-2
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,6 @@ def setUp(self):
13971397
self.d = datetime(2008, 1, 1)
13981398
self.nd = np_datetime64_compat('2008-01-01 00:00:00Z')
13991399

1400-
tm._skip_if_no_cday()
14011400
self.offset = CDay()
14021401
self.offset2 = CDay(2)
14031402

@@ -1629,7 +1628,6 @@ class CustomBusinessMonthBase(object):
16291628
def setUp(self):
16301629
self.d = datetime(2008, 1, 1)
16311630

1632-
tm._skip_if_no_cday()
16331631
self.offset = self._object()
16341632
self.offset2 = self._object(2)
16351633

pandas/util/testing.py

-8
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,6 @@ def _skip_if_windows():
250250
import nose
251251
raise nose.SkipTest("Running on Windows")
252252

253-
254-
def _skip_if_no_cday():
255-
from pandas.core.datetools import cday
256-
if cday is None:
257-
import nose
258-
raise nose.SkipTest("CustomBusinessDay not available.")
259-
260-
261253
def _skip_if_no_pathlib():
262254
try:
263255
from pathlib import Path

0 commit comments

Comments
 (0)