Skip to content

Commit fe1e225

Browse files
committed
Revert the Dates-related tests to throw MethodErrors instead of testing against NoUnits
This was to accommodate the removed unwanted methods unit(::Any) and unit(::Function).
1 parent c230a6a commit fe1e225

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/dates.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
@test_throws MethodError dimension(T(1))
1313
@test_throws MethodError Unitful.numtype(T)
1414
@test_throws MethodError Unitful.numtype(T(1))
15-
@test unit(T) == NoUnits
16-
@test unit(T(1)) == NoUnits
15+
@test_throws MethodError unit(T)
16+
@test_throws MethodError unit(T(1))
1717
end
1818

1919
for p = (CompoundPeriod, CompoundPeriod(), CompoundPeriod(Day(1)), CompoundPeriod(Day(1), Hour(-1)))
2020
@test dimension(p) === 𝐓
2121
@test_throws MethodError Unitful.numtype(p)
22-
@test unit(p) == NoUnits
22+
@test_throws MethodError unit(p)
2323
end
2424
end
2525

0 commit comments

Comments
 (0)