8000 mark failing tests · RustPython/RustPython@36388af · GitHub
[go: up one dir, main page]

Skip to content

Commit 36388af

Browse files
committed
mark failing tests
1 parent 5b1ce18 commit 36388af

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ env:
1818
CARGO_ARGS: --no-default-features --features stdlib,zlib,importlib,encodings,ssl
1919
# Skip additional tests on Windows. They are checked on Linux and MacOS.
2020
WINDOWS_SKIPS: >-
21+
test_datetime
2122
test_glob
2223
test_importlib
2324
test_io

Lib/test/datetimetester.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ def test_normal(self):
196196
self.assertEqual(fo.tzname(dt), "Three")
197197
self.assertEqual(fo.dst(dt), timedelta(minutes=42))
198198

199+
# TODO: RUSTPYTHON
200+
@unittest.expectedFailure
199201
def test_pickling_base(self):
200202
# There's no point to pickling tzinfo objects on their own (they
201203
# carry no data), but they need to be picklable anyway else
@@ -207,6 +209,8 @@ def test_pickling_base(self):
207209
derived = unpickler.loads(green)
208210
self.assertIs(type(derived), tzinfo)
209211

212+
# TODO: RUSTPYTHON
213+
@unittest.expectedFailure
210214
def test_pickling_subclass(self):
211215
# Make sure we can pickle/unpickle an instance of a subclass.
212216
offset = timedelta(minutes=-300)
@@ -385,6 +389,8 @@ def test_aware_datetime(self):
385389
self.assertEqual(tz.dst(t),
386390
t.replace(tzinfo=tz).dst())
387391

392+
# TODO: RUSTPYTHON
393+
@unittest.expectedFailure
388394
def test_pickle(self):
389395
for tz in self.ACDT, self.EST, timezone.min, timezone.max:
390396
for pickler, unpickler, proto in pickle_choices:
@@ -395,6 +401,8 @@ def test_pickle(self):
395401
tz_copy = unpickler.loads(pickler.dumps(tz, proto))
396402
self.assertIs(tz_copy, tz)
397403

404+
# TODO: RUSTPYTHON
405+
@unittest.expectedFailure
398406
def test_copy(self):
399407
for tz in self.ACDT, self.EST, timezone.min, timezone.max:
400408
tz_copy = copy.copy(tz)
@@ -403,6 +411,8 @@ def test_copy(self):
403411
tz_copy = copy.copy(tz)
404412
self.assertIs(tz_copy, tz)
405413

414+
# TODO: RUSTPYTHON
415+
@unittest.expectedFailure
406416
def test_deepcopy(self):
407417
for tz in self.ACDT, self.EST, timezone.min, timezone.max:
408418
tz_copy = copy.deepcopy(tz)
@@ -1498,6 +1508,8 @@ def test_strftime(self):
14981508
# bpo-41260: The parameter was named "fmt" in the pure python impl.
14991509
t.strftime(format="%f")
15001510

1511+
# TODO: RUSTPYTHON
1512+
@unittest.expectedFailure
15011513
def test_strftime_trailing_percent(self):
15021514
# bpo-35066: Make sure trailing '%' doesn't cause datetime's strftime to
15031515
# complain. Different libcs have different handling of trailing
@@ -1598,6 +1610,8 @@ def test_pickling(self):
15981610
self.assertEqual(orig, derived)
15991611
self.assertEqual(orig.__reduce__(), orig.__reduce_ex__(2))
16001612

1613+
# TODO: RUSTPYTHON
1614+
@unittest.expectedFailure
16011615
def test_compat_unpickle(self):
16021616
tests = [
16031617
b"cdatetime\ndate\n(S'\\x07\\xdf\\x0b\\x1b'\ntR.",
@@ -2365,6 +2379,8 @@ def test_pickling_subclass_datetime(self):
23652379
self.assertEqual(orig, derived)
23662380
self.assertTrue(isinstance(derived, SubclassDatetime))
23672381

2382+
# TODO: RUSTPYTHON
2383+
@unittest.expectedFailure
23682384
def test_compat_unpickle(self):
23692385
tests = [
23702386
b'cdatetime\ndatetime\n('
@@ -2937,6 +2953,8 @@ def newmeth(self, start):
29372953
self.assertEqual(dt2.newmeth(-7), dt1.year + dt1.month +
29382954
dt1.second - 7)
29392955

2956+
# TODO: RUSTPYTHON
2957+
@unittest.expectedFailure
29402958
def test_subclass_alternate_constructors_datetime(self):
29412959
# Test that alternate constructors call the constructor
29422960
class DateTimeSubclass(self.theclass):
@@ -3635,6 +3653,8 @@ def test_pickling_subclass_time(self):
36353653
self.assertEqual(orig, derived)
36363654
self.assertTrue(isinstance(derived, SubclassTime))
36373655

3656+
# TODO: RUSTPYTHON
3657+
@unittest.expectedFailure
36383658
def test_compat_unpickle(self):
36393659
tests = [
36403660
(b"cdatetime\ntime\n(S'\\x14;\\x10\\x00\\x10\\x00'\ntR.",
@@ -4007,6 +4027,8 @@ def test_hash_edge_cases(self):
40074027
t2 = self.theclass(23, 48, 6, 100, tzinfo=FixedOffset(-1010, ""))
40084028
self.assertEqual(hash(t1), hash(t2))
40094029

4030+
# TODO: RUSTPYTHON
403 A3DB 1+
@unittest.expectedFailure
40104032
def test_pickling(self):
40114033
# Try one without a tzinfo.
40124034
args = 20, 59, 16, 64**2
@@ -4029,6 +4051,8 @@ def test_pickling(self):
40294051
self.assertEqual(derived.tzname(), 'cookie')
40304052
self.assertEqual(orig.__reduce__(), orig.__reduce_ex__(2))
40314053

4054+
# TODO: RUSTPYTHON
4055+
@unittest.expectedFailure
40324056
def test_compat_unpickle(self):
40334057
tests = [
40344058
b"cdatetime\ntime\n(S'\\x05\\x06\\x07\\x01\\xe2@'\n"
@@ -4458,6 +4482,8 @@ def utcoffset(self, dt):
44584482
t2 = self.theclass(2, 2, 2, tzinfo=FixedOffset(0, ""))
44594483
self.assertRaises(ValueError, lambda: t1 == t2)
44604484

4485+
# TODO: RUSTPYTHON
4486+
@unittest.expectedFailure
44614487
def test_pickling(self):
44624488
# Try one without a tzinfo.
44634489
args = 6, 7, 23, 20, 59, 1, 64**2
@@ -4481,6 +4507,8 @@ def test_pickling(self):
44814507
self.assertEqual(derived.tzname(), 'cookie')
44824508
self.assertEqual(orig.__reduce__(), orig.__reduce_ex__(2))
44834509

4510+
# TODO: RUSTPYTHON
4511+
@unittest.expectedFailure
44844512
def test_compat_unpickle(self):
44854513
tests = [
44864514
b'cdatetime\ndatetime\n'
@@ -5443,6 +5471,8 @@ def test_bug_1028306(self):
54435471
self.assertEqual(as_datetime, datetime_sc)
54445472
self.assertEqual(datetime_sc, as_datetime)
54455473

5474+
# TODO: RUSTPYTHON
5475+
@unittest.expectedFailure
54465476
def test_extra_attributes(self):
54475477
with self.assertWarns(DeprecationWarning):
54485478
utcnow = datetime.utcnow()

Lib/test/test_datetime.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@ def load_tests(loader, tests, pattern):
2020
for modname in ['datetime', '_datetime', '_strptime']:
2121
sys.modules.pop(modname, None)
2222

23-
test_modules = [pure_tests, fast_tests]
24-
test_suffixes = ["_Pure", "_Fast"]
23+
test_modules = [
24+
pure_tests,
25+
# fast_tests # XXX: RUSTPYTHON; not supported yet
26+
]
27+
test_suffixes = [
28+
"_Pure",
29+
# "_Fast" # XXX: RUSTPYTHON; not supported yet
30+
]
2531
# XXX(gb) First run all the _Pure tests, then all the _Fast tests. You might
2632
# not believe this, but in spite of all the sys.modules trickery running a _Pure
2733
# test last will leave a mix of pure and native datetime stuff lying around.

0 commit comments

Comments
 (0)
0