-
-
Notifications
You must be signed in to change notification settings - Fork 18k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TST/REF: collect tests by method (#37589)
* TST/REF: move remaining setitem tests from test_timeseries * TST/REF: rehome test_timezones test * move misplaced arithmetic test * collect tests by method * move misplaced file
- Loading branch information
1 parent
06251dd
commit 4bad8cb
Showing
16 changed files
with
199 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import numpy as np | ||
|
||
from pandas import Series, date_range | ||
|
||
|
||
class TestIsMonotonic: | ||
def test_is_monotonic_numeric(self): | ||
|
||
ser = Series(np.random.randint(0, 10, size=1000)) | ||
assert not ser.is_monotonic | ||
ser = Series(np.arange(1000)) | ||
assert ser.is_monotonic is True | ||
assert ser.is_monotonic_increasing is True | ||
ser = Series(np.arange(1000, 0, -1)) | ||
assert ser.is_monotonic_decreasing is True | ||
|
||
def test_is_monotonic_dt64(self): | ||
|
||
ser = Series(date_range("20130101", periods=10)) | ||
assert ser.is_monotonic is True | ||
assert ser.is_monotonic_increasing is True | ||
|
||
ser = Series(list(reversed(ser))) | ||
assert ser.is_monotonic is False | ||
assert ser.is_monotonic_decreasing is True |
Oops, something went wrong.