/usr/local/lib64/python3.6/site-packages/pandas/tests/indexes/period
NameSizeModeActions
__pycache__/-0755rm
test_asfreq.py54320644editdlrm
test_astype.py61890644editdlrm
test_constructors.py198310644editdlrm
test_factorize.py12670644editdlrm
test_fillna.py11040644editdlrm
test_formats.py69710644editdlrm
test_indexing.py290170644editdlrm
test_join.py14100644editdlrm
test_monotonic.py12450644editdlrm
test_ops.py126420644editdlrm
test_partial_slicing.py53230644editdlrm
test_period.py214620644editdlrm
test_period_range.py39540644editdlrm
test_scalar_compat.py11230644editdlrm
test_searchsorted.py26220644editdlrm
test_setops.py120870644editdlrm
test_shift.py43980644editdlrm
test_tools.py10060644editdlrm
test_to_timestamp.py36120644editdlrm
__init__.py00644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/pandas/tests/indexes/period/test_join.py (1410B)
import numpy as np import pytest from pandas._libs.tslibs import IncompatibleFrequency from pandas import Index, PeriodIndex, period_range import pandas._testing as tm class TestJoin: def test_joins(self, join_type): index = period_range("1/1/2000", "1/20/2000", freq="D") joined = index.join(index[:-5], how=join_type) assert isinstance(joined, PeriodIndex) assert joined.freq == index.freq def test_join_self(self, join_type): index = period_range("1/1/2000", "1/20/2000", freq="D") res = index.join(index, how=join_type) assert index is res def test_join_does_not_recur(self): df = tm.makeCustomDataframe( 3, 2, data_gen_f=lambda *args: np.random.randint(2), c_idx_type="p", r_idx_type="dt", ) s = df.iloc[:2, 0] res = s.index.join(df.columns, how="outer") expected = Index([s.index[0], s.index[1], df.columns[0], df.columns[1]], object) tm.assert_index_equal(res, expected) def test_join_mismatched_freq_raises(self): index = period_range("1/1/2000", "1/20/2000", freq="D") index3 = period_range("1/1/2000", "1/20/2000", freq="2D") msg = r".*Input has different freq=2D from PeriodIndex\(freq=D\)" with pytest.raises(IncompatibleFrequency, match=msg): index.join(index3)