TST: Added fromisocalendar test cases
- [x] closes #28115
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

cc @jbrockmendel  This is a good start.  Next up you need to add tests for the new functionality.  Those will go in `pandas.tests.scalar.timestamp.test_timestamp.TestTimestampConstructors`.  Look at the tests we have there for the other similar Timestamp classmethods to get an idea of what the tests should look like if you look at the CI  results you'll see some red checkmarks.  you're going to need to click through to find out why this is failing so you can fix it (spoiler: test_missing_public_nat_methods) Good going so far.  You changed it to raise in older python versions and fixed the test that was broken before.  But now if you look at the CI you'll see there is a different test that is broken.

So the next step is to look at the CI log to tell what test(s) are failing (spoiler: the test you added is failing when run in older pythons) and figure out how to fix it.  (Ideally also you'll run the tests locally to make sure they pass on your computer before pushing, let me know if you have trouble with that)

This becomes more intuitive with experience. >Ideally also you'll run the tests locally to make sure they pass on your computer before pushing

I did, the problem is I have python 3.8

Anyway, I'll fix it.


Is there's  more elegant way rather than making an ```if``` statement checking the python version? Good progress So I just tried pd.Timestamp.fromisocalendar on 0.25.3 and it works fine (i.e. correctly returns a Timestamp).  I think we need a test for this, but the actual implementation in the cython file is unnecessary. > So I just tried pd.Timestamp.fromisocalendar on 0.25.3 and it works fine (i.e. correctly returns a Timestamp). I think we need a test for this, but the actual implementation in the cython file is unnecessary.

So remove the code here?

https://github.com/MomIsBestFriend/pandas/blob/88468fa3604457319401b126764ed49be3e6d15f/pandas/_libs/tslibs/timestamps.pyx#L340

(Removed the new created method?) > (Removed the new created method?)

I think the test will still pass, so yes. Since I really didn't add anything new to the code base (except test cases).

Can #28115 be closed? > Can #28115 be closed?

Yes it can @jbrockmendel do we need to do anything for NaT here? add make_error_func and test for it? > do we need to do anything for NaT here? add make_error_func and test for it?

Yes.  ATM it looks like `pd.NaT.fromisocalendar(y, m, d)` incorrectly calls `NaT.__new__` and raises a non-helpful TypeError.  @MomIsBestFriend can you update and test NaT appropriately? @MomIsBestFriend seems like there are some CI failures for py37 and earlier. code & tests lgtm. can you add a whatsnew node; other enhancements section is ok, just say added compatiblity with datetime.isocalender for PY >= 38 thanks @MomIsBestFriend 