Commit Graph

1986 Commits

Author SHA1 Message Date
Daniel Watkins
c5eba15370 test_format: run test_bytes_and_bytearray_format
All the errors have now been addressed.
2021-11-01 21:34:51 -04:00
Daniel Watkins
380653b6cb cformat.rs: implement %a correctly, using builtins::ascii
The repr() of Unicode strings is the Unicode string, so the previous
code was incorrect for that case (at least).
2021-11-01 21:34:51 -04:00
snowapril
e2142e1d07 Remove skip decorator on window test
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-11-01 15:20:55 +09:00
Daniel Watkins
156cf6bc86 stdlib/posix.rs: implement mknod 2021-10-31 09:04:56 -04:00
Jeong YunWon
859744236e Merge pull request #3391 from deantvv/os-error-refactor
Refactor OSError
2021-10-30 22:40:10 +09:00
Dean Li
a59556ad25 Refactor OSError
Implement `raw_os_error_to_exc_type` to reduce duplication of errno to
exception type.
2021-10-30 17:05:54 +08:00
Jeong YunWon
2ac05aba66 Merge pull request #3381 from DimitrisJim/time_mod
Time mod additions
2021-10-30 15:42:10 +09:00
Daniel Watkins
1ea93a59d5 stdlib/io.rs: align negative-fd-from-opener exception with CPython 2021-10-28 15:05:55 -04:00
jfh
c6ac24c2f2 Clean up cfgs, handle 32bit timespec creation, skip tests for windows. 2021-10-28 21:42:40 +03:00
Jeong YunWon
35e56efa65 Merge pull request #3366 from zetwhite/dict_richcmp
Implements Comparable for PyDictKeys, PyDictItems
2021-10-28 00:41:14 +09:00
jfh
ee77f3c332 Add monotonic_ns, perf_counter, perf_counter_ns. 2021-10-27 11:54:58 +03:00
jfh
1817fd6565 Add get_clock_info. 2021-10-27 10:36:10 +03:00
Jeong YunWon
281e2ee4db Merge pull request #3378 from chrismoradi/update-collections-and-tests-from-cpython
Update collections from CPython, fix tests for UserDict/List/String
2021-10-27 02:35:06 +09:00
jfh
cab44a2ac3 Add clock_gettime, clock_settime, clock_getres. 2021-10-26 20:06:09 +03:00
Chris Moradi
6abfc3a00c Revert UserDict.__init__ changes, new passing test of UserList 2021-10-25 22:41:59 -07:00
Chris Moradi
ec247e0d4f Update collections from CPython, fix tests for UserDict/List/String
Clean implementation of changes in PR #3371 based on feedback.

Copies from [CPython tag `v3.9.7` and adds back custom RustPython changes where needed for:
- `Lib/collections/__init__.py`
- `Lib/test/test_collections.py`

Closes: #3371
2021-10-25 21:19:44 -07:00
Dean Li
6ec380369a os: fix test_putenv for all os 2021-10-25 19:40:32 +08:00
Tetramad
c88c69a993 Fix math.log1p to pass some failed tests
Now math.log1p with less than or equal to negative one should raise
ValueError with "math domain error" message
2021-10-25 14:44:13 +09:00
Tetramad
3d8f6cf08d Fix math.log to pass some failed tests
Now math.log with less than or equal to zero should raise ValueError
with "math domain error" message if `x` fit in f64
2021-10-25 14:44:08 +09:00
Tetramad
ba3cafc932 Fix math.atanh to pass failed tests
Now math.atanh with out of domain value should raise ValueError with
"math domain error" message
2021-10-25 10:45:11 +09:00
Jeong YunWon
b0795e89f7 Merge pull request #3370 from deantvv/test-posix-reason
test: posix update failure reason
2021-10-24 19:53:38 +09:00
Dean Li
46c38c09d2 test: posix update failure reason 2021-10-24 18:05:19 +08:00
Dean Li
91256a4ec6 posix: add rtld constants 2021-10-24 17:53:49 +08:00
zetwhite
a401d8c190 make work dictview compare test 2021-10-24 16:54:33 +09:00
Padraic Fanning
9fdd76c1dd Delete partial causing custom runner failure 2021-10-22 18:16:47 -04:00
Jim Fasarakis-Hilliard
7d1f75dd2f Merge pull request #3351 from Snowapril/fix-generic-alias
Add missing methods on `GenericAlias`
2021-10-22 16:32:18 +03:00
snowapril
92b81e5dd8 update some test in test_typing from cpython 3.10
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-22 18:43:15 +09:00
snowapril
48d6ba154f add decorators on failed tests
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-22 18:43:15 +09:00
snowapril
b2eff4ae53 add missing __class_getitem__ from cpython 3.10
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-22 18:43:15 +09:00
snowapril
f491bb8fc4 commented out on missing module in rustpython
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-22 18:43:15 +09:00
snowapril
4a3dab0b41 add test_genericalias.py from cpython 3.10
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-22 18:43:15 +09:00
jfh
2299878395 Mark failing resourse tests. 2021-10-22 10:33:18 +03:00
jfh
9ab71fee02 Add test_resource from Python 3.8 2021-10-22 10:29:30 +03:00
jfh
103195b277 Remove Python gc stub, add rust stub. 2021-10-21 19:56:20 +03:00
Jeong YunWon
fd2ba5159e Merge pull request #3204 from fanninpm/cleanup-skipped-tests
Clean up some skipped tests
2021-10-21 02:39:15 +09:00
Jeong YunWon
82fac6ce53 Merge pull request #3263 from Snowapril/suggestion
Implement keyword suggestion on `PyAttributeError` and `PyNameError` from cpython 3.10
2021-10-21 02:30:46 +09:00
Jeong YunWon
5ce05fcca0 Merge pull request #3330 from deantvv/uid-gid-from-object
posix: handle case -1 for `Uid` and `Gid`
2021-10-21 01:43:52 +09:00
Jeong YunWon
946f4ecc89 Merge pull request #3334 from DimitrisJim/namespace_fixes
Namespace fixes
2021-10-21 01:35:04 +09:00
Jeong YunWon
a83ad7aa1c Merge pull request #3337 from deantvv/fix-os-putenv
os: fix putenv
2021-10-21 01:33:37 +09:00
Dean Li
c56db2fafa os: fix putenv
Check key and value before calling `env::set_var`

From doc of `env::set_var`,
```

This function may panic if `key` is empty, contains an ASCII equals sign
`'='` or the NUL character `'\0'`, or when the value contains the NUL
character.
```
2021-10-20 23:15:39 +08:00
Dean Li
86920e21e5 posix: handle case -1 for Uid and Gid
For `Uid` and `Gid`, -1 means does not change the value.
2021-10-20 22:23:36 +08:00
snowapril
1bff6a38d1 add decorators on failed tests
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-20 10:19:42 +09:00
snowapril
8d0cefeb64 update test_exceptions.py from cpython 3.10 for suggestion feature
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-20 10:19:42 +09:00
Padraic Fanning
253ecda09e Clean up skips in test_unittest 2021-10-19 20:37:35 -04:00
jfh
c6a8511425 Add repr for namespaces. 2021-10-19 16:29:41 +03:00
jfh
809171dcf8 Make namespaces comparable. 2021-10-19 16:29:41 +03:00
Padraic Fanning
e5acfc3a67 Clean up skip in test_json.test_speedups 2021-10-18 22:09:36 -04:00
Padraic Fanning
05f3ef557b Clean up skip in test_json.test_decode 2021-10-18 22:09:17 -04:00
Padraic Fanning
bab6f75016 Clean up skips in test_importlib.source 2021-10-18 21:56:47 -04:00
Padraic Fanning
dd4adf976e Clean up skip in test_zipfile 2021-10-18 21:43:54 -04:00