Skip to content

Commit

Permalink
Merge pull request #1 from notZaki/FixTestFile
Browse files Browse the repository at this point in the history
Update test file & fix testing failing on nightly
  • Loading branch information
AaronGhost authored May 23, 2024
2 parents ab56ed2 + 8c48256 commit eb31cab
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.0'
- '1'
- 'nightly'
- "1"
- "nightly"
os:
- ubuntu-latest
- macOS-latest
Expand Down
7 changes: 4 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name = "DICOM"
uuid = "a26e6606-dd52-5f6a-a97f-4f611373d757"
version = "0.10.1"
version = "0.11.0"

[compat]
julia = "0.7, 1"
julia = "1.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

[targets]
test = ["Test"]
test = ["Test", "Downloads"]
11 changes: 5 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Test
using DICOM
using Downloads

const data_folder = joinpath(@__DIR__, "testdata")
if !isdir(data_folder)
Expand All @@ -25,16 +26,16 @@ const dicom_samples = Dict(
"https://github.com/notZaki/DICOMSamples/raw/master/DICOMSamples/OT_Implicit_Little_Headless.dcm",
"US_Explicit_Big_RGB.dcm" =>
"https://github.com/notZaki/DICOMSamples/raw/master/DICOMSamples/US_Explicit_Big_RGB.dcm",
# "DX_Implicit_Little_Interleaved.dcm" =>
# "https://github.com/OHIF/viewer-testdata/raw/master/dcm/zoo-exotic/5.dcm",
"DX_Implicit_Little_Interleaved.dcm" =>
"https://github.com/notZaki/DICOMSamples/raw/master/DICOMSamples/DX_Implicit_Little_Interleaved.dcm",
)

function download_dicom(filename; folder = data_folder)
@assert haskey(dicom_samples, filename)
url = dicom_samples[filename]
filepath = joinpath(folder, filename)
if !isfile(filepath)
download(url, filepath)
Downloads.download(url, filepath)
end
return filepath
end
Expand Down Expand Up @@ -185,13 +186,11 @@ end
@test size(dcmUS[(0x7fe0, 0x0010)]) == (480, 640, 3)
end

#==
@testset "Test interleaved" begin
fileDX = download_dicom("DX_Implicit_Little_Interleaved.dcm")
dcmDX = dcm_parse(fileDX)
@test size(dcmDX[(0x7fe0, 0x0010)]) == (1590, 2593, 3)
end
==#

@testset "Test Compressed" begin
fileCT = download_dicom("CT_JPEG70.dcm")
Expand Down Expand Up @@ -306,4 +305,4 @@ end
# Check that the length is (0xffffffff) for undefined length SQ
@test PerformedProtocolSequence[9:12] == "\xff\xff\xff\xff"
@test PerformedProtocolSequence[end-7:end] == "\xfe\xff\xdd\xe0\x00\x00\x00\x00"
end
end

0 comments on commit eb31cab

Please sign in to comment.