forked from IronLanguages/ironpython3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_datetime_stdlib.py
More file actions
53 lines (45 loc) · 2.73 KB
/
test_datetime_stdlib.py
File metadata and controls
53 lines (45 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
##
## Run selected tests from test_datetime from StdLib
##
from iptest import is_ironpython, generate_suite, run_test
import test.datetimetester
def load_tests(loader, standard_tests, pattern):
tests = loader.loadTestsFromModule(test.datetimetester)
if is_ironpython:
failing_tests = [
test.datetimetester.TestDate('test_backdoor_resistance'),
test.datetimetester.TestDate('test_insane_fromtimestamp'),
test.datetimetester.TestDateTime('test_backdoor_resistance'),
test.datetimetester.TestDateTime('test_extreme_timedelta'),
test.datetimetester.TestDateTime('test_insane_fromtimestamp'),
test.datetimetester.TestDateTime('test_insane_utcfromtimestamp'),
test.datetimetester.TestDateTime('test_microsecond_rounding'),
test.datetimetester.TestDateTime('test_strftime_with_bad_tzname_replace'),
test.datetimetester.TestDateTimeTZ('test_backdoor_resistance'),
test.datetimetester.TestDateTimeTZ('test_even_more_compare'),
test.datetimetester.TestDateTimeTZ('test_extreme_hashes'),
test.datetimetester.TestDateTimeTZ('test_extreme_timedelta'),
test.datetimetester.TestDateTimeTZ('test_insane_fromtimestamp'),
test.datetimetester.TestDateTimeTZ('test_insane_utcfromtimestamp'),
test.datetimetester.TestDateTimeTZ('test_microsecond_rounding'),
test.datetimetester.TestDateTimeTZ('test_mixed_compare'),
test.datetimetester.TestDateTimeTZ('test_strftime_with_bad_tzname_replace'),
test.datetimetester.TestDateTimeTZ('test_tz_aware_arithmetic'),
test.datetimetester.TestSubclassDateTime('test_backdoor_resistance'),
test.datetimetester.TestSubclassDateTime('test_extreme_timedelta'),
test.datetimetester.TestSubclassDateTime('test_insane_fromtimestamp'),
test.datetimetester.TestSubclassDateTime('test_insane_utcfromtimestamp'),
test.datetimetester.TestSubclassDateTime('test_microsecond_rounding'),
test.datetimetester.TestSubclassDateTime('test_replace'), # TODO
test.datetimetester.TestSubclassDateTime('test_strftime_with_bad_tzname_replace'),
test.datetimetester.TestTimeDelta('test_computations'), # rounding differences
test.datetimetester.TestTimeTZ('test_zones'),
test.datetimetester.TestTimeZone('test_constructor'),
]
return generate_suite(tests, failing_tests)
else:
return tests
run_test(__name__)