Commit Graph

1290 Commits

Author SHA1 Message Date
HyeockJinKim
e812024737 Add tests for seqeunce comparison 2019-10-04 20:42:24 +09: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
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
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
HyeockJinKim
6f50e4ad3e Add tests for global 2019-09-18 01:57:52 +09:00
tsvankay
5b2158ab18 fixed __repr__ return value for -0.0 2019-09-18 01:03:29 +09:00
Jeong YunWon
758073db07 Add _msg back to assert_raises 2019-09-17 18:52:16 +09:00
Jeong YunWon
dc8057a1c2 Refactor snippets/testutil 2019-09-17 17:37:24 +09:00
coolreader18
a878ffc678 Remove useless_const optimization
There could be jump depending on the Pop being there, and then it
breaks.
2019-09-17 08:04:11 +02:00
Noah
8c411bc2a4 Merge pull request #1381 from HyeockJinKim/range
Fixed calculation for range
2019-09-15 22:33:10 -05:00
HyeockJinKim
c141e6d557 Add tests for range type 2019-09-16 01:23:57 +09:00
Noah
fcd39a3115 Merge pull request #1372 from j30ng/itertools-accumulate
Implement itertools.accumulate
2019-09-14 12:09:04 -05:00
j30ng
708fd9bcfb Implement itertools.accumulate 2019-09-14 01:16:19 +09:00
Windel Bouwman
31d7121af9 Merge pull request #1369 from vazrupe/pos-args-error
Add Positional argument error to LexicalError
2019-09-13 11:07:55 +02:00
HyeonGyu Lee (Vazrupe)
0ab46fd2bd Add Positional argument error to LexicalError
Fixes #1046
2019-09-13 01:46:31 +09:00
Noah
0d1525965c Merge pull request #1366 from HyeockJinKim/issue1365
Fix unsupported operand type of str problem
2019-09-11 17:43:16 -05:00
HyeockJinKim
9a0078214a Add test for str 2019-09-12 06:52:34 +09:00
HyeockJinKim
f8cb4a5690 Add test for nonlocal 2019-09-12 01:14:14 +09:00
Jeong YunWon
65c90ab976 Merge pull request #1343 from vazrupe/add-framework-attr
Add framework attribute in sys module
2019-09-11 03:00:09 +09:00
HyeonGyu Lee (Vazrupe)
1be7cc6308 Add framework attribute in sys module
Fixes #1342
2019-09-10 20:16:11 +09:00