Commit Graph

1306 Commits

Author SHA1 Message Date
Jeong YunWon
2153ebbc23 Fix pow(0, exp) with negative exp to raise ZeroDivisionError 2019-10-05 00:04:31 +09:00
Windel Bouwman
0d9e723bdb Merge pull request #1463 from lazylife7157/memoryview_hash
Fix #1394 Memoryview hash problem
2019-10-04 10:55:18 +02:00
lazylife7157
c3af2bb858 Make memoryview.__hash__() returns hash value of wrapped object 2019-10-05 01:41:49 +09:00
Windel Bouwman
faee9e3652 Merge pull request #1458 from j30ng/itertools-tee
Implement itertools.tee
2019-10-04 10:53:25 +02:00
j30ng
0b7da12463 Fix Bug in tee.__next__ + Add Test 2019-10-04 16:11:43 +09:00
j30ng
418de0f62f Add Tests
* Test `__copy__` method for `tee` objects works properly.
* Cover the case where the iterable argument passed to `itertools.tee()`
  has `__copy__` method implemented.
2019-10-04 15:44:57 +09:00
Noah
9c4c39aef2 Merge pull request #1456 from RustPython/revert-1444-fix-int-arg
Revert "Fix argument keyword error in int/float/bool.__new__"
2019-10-03 15:18:32 -05:00
j30ng
048ec3e0ee Add Testcases 2019-10-04 03:33:47 +09:00
Windel Bouwman
699450ddd7 Merge pull request #1447 from RustPython/coolreader18/type-attrs
Fix properties on `type`
2019-10-03 20:10:25 +02:00
coolreader18
936119073b Add tests for type.__bases__, fix type.__bases__ 2019-10-03 09:46:57 -05:00
Seo Sanghyeon
bdb6208f6f Do not panic in parser 2019-10-03 19:41:12 +09:00
Noah
9ed825742c Revert " Fix argument keyword error in int/float/bool.__new__" 2019-10-02 21:33:43 -05:00
Noah
d047dc0bd1 Merge pull request #1444 from lntuition/fix-int-arg
Fix argument keyword error in int/float/bool.__new__
2019-10-02 12:14:19 -05:00
Windel Bouwman
339e44fb5c Merge pull request #1420 from lntuition/fix-1408
Fix int type casting errors
2019-10-02 17:27:54 +02:00
Sang-Heon Jeon
49577e0713 Merge branch 'master' into fix-int-arg 2019-10-02 15:19:01 +09:00
lntuition
02135be992 Add testcase for bool.__new__
Add testcase for bool.__new__
2019-10-02 15:13:45 +09:00
Noah
d9cdb32e49 Merge pull request #1441 from dralley/fix-strings
Handle unicode indexing by character, not by grapheme
2019-10-01 19:01:41 -05:00
Daniel Alley
02ea0b629f Handle unicode indexing by character, not by grapheme
Python isn't grapheme aware, so for compatibility sake, we shouldn't be
either.

closes #1417
2019-10-01 12:37:16 -04:00
Noah
36a4e107d7 Merge pull request #1414 from RustPython/coolreader18/enum-module
Fix weirdness with type.__new__()/type()/metaclass.__new__() in order to support enum
2019-10-01 07:26:31 -05:00
HyeockJinKim
246cb81ebe Add tests for slice.__eq__ and slice.__ne__ 2019-10-01 14:39:27 +09:00
Aviv Palivoda
da17726a90 Merge pull request #1380 from mpajkowski/os_scandir_contextmanager
os.scandir refinement
2019-09-30 23:53:33 +03:00
lntuition
9cee128c6f Add testcase for float.__new__
Add testcase for float.__new__
2019-09-30 21:45:32 +09:00
lntuition
af0f03cdc6 Add testcase for int.__new__
Add testcase for int.__new__
2019-09-30 20:31:59 +09:00
coolreader18
7780337f72 Add mappingproxy.get tests 2019-09-29 23:32:51 -05:00
Jeong YunWon
ca24ca20e8 Merge pull request #1435 from HyeockJinKim/issue1431
Add __repr__ of slice
2019-09-29 17:38:02 +09:00
HyeockJinKim
55e70eac2a Add tests for slice 2019-09-29 16:59:27 +09:00
Windel Bouwman
e2444b1ca3 Merge pull request #1429 from lntuition/fix-int-with-byte
Fix error in int.from_bytes and int.to_bytes
2019-09-29 09:36:39 +02:00
lntuition
6bbc69b38a Fix int type casting which number has radix and front underscore
When some number has radix and front underscore both, then ignore front underscore

fixed: #1415
2019-09-29 12:57:55 +09:00
Windel Bouwman
188ff0ea73 Merge pull request #1430 from HyeockJinKim/issue1422
Generate SyntaxError at integer starting with 0
2019-09-28 21:08:06 +02:00
HyeockJinKim
831c883deb Add tests for integer 2019-09-29 01:12:11 +09:00
lntuition
42fef0c473 Add .cache/ to tests/.gitignore
When execute `pytest` local, sometimes generate .cache folder to tests folder.
Add .cache/ to tests/.gitignore prevent wrong commit.
2019-09-28 18:27:48 +09:00
lntuition
5a277adafb Add testcase for int.to_bytes 2019-09-28 18:22:44 +09:00
lntuition
9359a0cd05 Add testcase for int.from_bytes 2019-09-28 18:01:06 +09:00
j30ng
9ccc9d7bfa Add Testcase 2019-09-28 00:36:48 +09:00
Windel Bouwman
215eefe0b7 Merge pull request #1407 from vazrupe/dup-kargs-error
Add duplicate keyword argument error
2019-09-27 10:06:35 +02:00
Daniel Alley
32b4a9255f Allow float() to be called without an argument
closes #1421
2019-09-26 22:54:47 -04:00
Sang-Heon Jeon
d82fee7afa Fix wrong int type casting with radix and larger base value
Fix base value check logic when string have regex

Fixed: #1408
2019-09-26 21:45:17 +09:00
Jeong YunWon
f209929dbc Merge pull request #1413 from ChJR/hotfix/exit
Fix exit()
2019-09-26 20:16:08 +09:00
HyeonGyu Lee (Vazrupe)
00823dd923 Fix panic when using negative int for bytes()
Fixes #1401
2019-09-26 13:24:00 +09:00
Vazrupe (HyeonGyu Lee)
21669a023b Add duplicate keyword argument error
Fixes #116
2019-09-26 12:27:57 +09:00
Marcin Pajkowski
4e86119753 stdlib_os tests: do not remove tmp directory
Implement hack to avoid name collisions
2019-09-25 21:44:28 +02:00
Marcin Pajkowski
5620e7ed15 Create tests for os.scandir 2019-09-25 21:44:28 +02:00
Windel Bouwman
51c3f71eed Merge pull request #1406 from lntuition/fix-1405
Fix int type casting error with negative base value
2019-09-25 17:15:48 +02:00
Hyunji Kim
239115f686 itertools.compress 2019-09-25 22:55:05 +09:00
Sang-Heon Jeon
545e9d39df Fix int type casting error with negative base value
Change base type from u32 to PyIntRef

Fixed: #1405
2019-09-25 01:01:21 +09:00
ChJR
8c77f1a1cf Add builtin exit test 2019-09-25 00:25:28 +09:00
Daniel Alley
7858fb863a Add additional test snippets for range slicing 2019-09-23 15:46:58 -04:00
johan.park
db10a82cbe Update copysign module of math
- Implement copysign function with test case
- Add constants of NAN, INF, NINF on top of `math_module.py`
2019-09-22 16:12:41 +09:00
HyeockJinKim
38a815073c Add test for range __eq__ 2019-09-21 02:19:45 +09:00
Windel Bouwman
b2b02baad4 Merge pull request #1384 from tsvankay/float_repr
Fix __repr__ return value for -0.0
2019-09-17 19:54:53 +02:00