Skip to content

Remove unneeded test-all skips, based on 34739 by nobu #1743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions test/date/test_date_attr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ def test__wday_predicate
end

def test_nth_kday
skip unless Date.new.respond_to?(:nth_kday?, true)
assert_equal(false, Date.new(2001,1,14).__send__(:nth_kday?, 1,0))
assert_equal(true, Date.new(2001,1,14).__send__(:nth_kday?, 2,0))
assert_equal(false, Date.new(2001,1,14).__send__(:nth_kday?, 3,0))
Expand All @@ -99,6 +98,6 @@ def test_nth_kday
assert_equal(true, Date.new(2001,1,14).__send__(:nth_kday?, -3,0))
assert_equal(false, Date.new(2001,1,14).__send__(:nth_kday?, -4,0))
assert_equal(false, Date.new(2001,1,14).__send__(:nth_kday?, -5,0))
end
end if Date.new.respond_to?(:nth_kday?, true)

end
10 changes: 1 addition & 9 deletions test/date/test_date_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def test__inf
end

def test_ordinal__julian
skip unless defined?(Calendar)
for j in @from..@to
m, d, y = julian_from_absolute(absolute_from_julian_day_number(j))
j0 = julian_day_number_from_absolute(absolute_from_julian(12, 31, y - 1))
Expand All @@ -69,7 +68,6 @@ def test_ordinal__julian
end

def test_ordinal__gregorian
skip unless defined?(Calendar)
for j in @from..@to
m, d, y = gregorian_from_absolute(absolute_from_julian_day_number(j))
j0 =
Expand All @@ -85,7 +83,6 @@ def test_ordinal__gregorian
end

def test_civil__julian
skip unless defined?(Calendar)
for j in @from..@to
m, d, y = julian_from_absolute(absolute_from_julian_day_number(j))
j2 = julian_day_number_from_absolute(absolute_from_julian(m, d, y))
Expand All @@ -100,7 +97,6 @@ def test_civil__julian
end

def test_civil__gregorian
skip unless defined?(Calendar)
for j in @from..@to
m, d, y = gregorian_from_absolute(absolute_from_julian_day_number(j))
j2 = julian_day_number_from_absolute(absolute_from_gregorian(m, d, y))
Expand All @@ -115,7 +111,6 @@ def test_civil__gregorian
end

def test_commercial__gregorian
skip unless defined?(Calendar)
for j in @from..@to
w, d, y = iso_from_absolute(absolute_from_julian_day_number(j))
j2 = julian_day_number_from_absolute(absolute_from_iso(w, d, y))
Expand All @@ -130,7 +125,6 @@ def test_commercial__gregorian
end

def test_weeknum
skip unless defined?(Calendar)
for j in @from..@to
for k in 0..1
wy, ww, wd = Date.__send__(:jd_to_weeknum, j, k, Date::GREGORIAN)
Expand All @@ -141,7 +135,6 @@ def test_weeknum
end

def test_weeknum__2
skip unless defined?(Calendar)
for j in @from4t..@to4t
d = Date.jd(j)
t = Time.mktime(d.year, d.mon, d.mday)
Expand All @@ -159,7 +152,6 @@ def test_weeknum__2
end

def test_nth_kday
skip unless defined?(Calendar)
skip unless (Date.respond_to?(:nth_kday_to_jd, true) &&
Date.respond_to?(:jd_to_nth_kday, true))
for y in 1601..2401
Expand Down Expand Up @@ -440,4 +432,4 @@ def test_valid_time
assert_nil(DateTime.__send__(valid_time_p, 24,1,1))
end

end
end if defined?(Calendar)
6 changes: 2 additions & 4 deletions test/date/test_date_new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ def test_commercial__ex
end

def test_weeknum
skip unless Date.respond_to?(:weeknum, true)
d = Date.__send__(:weeknum)
dt = DateTime.__send__(:weeknum)
assert_equal([-4712, 1, 1], [d.year, d.mon, d.mday])
Expand All @@ -223,10 +222,9 @@ def test_weeknum
assert_raise(ArgumentError) do
Date.__send__(:weeknum, 1999,-53,-1, 0)
end
end
end if Date.respond_to?(:weeknum, true)

def test_nth_kday
skip unless Date.respond_to?(:nth_kday, true)
d = Date.__send__(:nth_kday)
dt = DateTime.__send__(:nth_kday)
assert_equal([-4712, 1, 1], [d.year, d.mon, d.mday])
Expand All @@ -246,7 +244,7 @@ def test_nth_kday
assert_raise(ArgumentError) do
Date.__send__(:nth_kday, 2006,5, -5,0)
end
end
end if Date.respond_to?(:nth_kday, true)

def test_today
z = Time.now
Expand Down
3 changes: 1 addition & 2 deletions test/date/test_switch_hitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,7 @@ def test_dup
end

def test_base
skip unless defined?(Date.test_all)
assert_equal(true, Date.test_all)
end
end if defined?(Date.test_all)

end
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy