| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| self.assertEqual(sys.getsizeof(True, -1), size('') + self.longdigit) | ||
|
|
||
| def test_objecttypes(self): | ||
| import _datetime |
There was a problem hiding this comment.
I suggest to import it just before it is used, like collections.
And since it is optional, skip the corresponding test if the import fails.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks! Fixed it
Sorry, something went wrong.
There was a problem hiding this comment.
And since it is optional, skip the corresponding test if the import fails.
_datetime is now a built-in module, it's not really optional.
Sorry, something went wrong.
There was a problem hiding this comment.
Isn't it just an implementation detail? It was made builtin to solve a particular technical issue which can be solved in other way.
Sorry, something went wrong.
| check(x, size('5Pi')) | ||
| # PyCapsule | ||
| import _datetime | ||
| check(_datetime.datetime_CAPI, size('6P')) |
There was a problem hiding this comment.
As @serhiy-storchaka requested, this line should only be run if _datetime is available. Something like:
try:
import _datetime
except ImportError:
pass
else:
check(_datetime.datetime_CAPI, size('6P'))
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
Thanks @youknowone for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
Sorry, something went wrong.
(cherry picked from commit c447d1b) Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
(cherry picked from commit c447d1b) Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
|
GH-144143 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
|
GH-144144 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The _datetime dependency of test_sys is only required for @cpython_only decorated test.