Skip to content

Commit 9c2935d

Browse files
author
Bruno Grande
committed
Ensure relative paths for test JSON files
1 parent 9799703 commit 9c2935d

File tree

8 files changed

+11
-10
lines changed

8 files changed

+11
-10
lines changed

tests/data/file.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
},
66
"type": "TIFF",
77
"name": "test.txt",
8-
"local_path": "/Users/bgrande/Repos/py-dcqc/tests/data/test.txt"
8+
"local_path": "tests/data/test.txt"
99
}

tests/data/generate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import os
66
import sys
7+
from pathlib import Path
78
from typing import Sequence
89

910
from dcqc.file import File
@@ -16,7 +17,7 @@
1617
# Shared values
1718
data_dir = sys.path[0]
1819
data_dir = os.path.relpath(data_dir)
19-
report = JsonReport()
20+
report = JsonReport(paths_relative_to=Path.cwd())
2021

2122

2223
# Shared functions

tests/data/suite.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"type": "TIFF",
1313
"name": "test.txt",
14-
"local_path": "/Users/bgrande/Repos/py-dcqc/tests/data/test.txt"
14+
"local_path": "tests/data/test.txt"
1515
}
1616
]
1717
},

tests/data/target.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"type": "TIFF",
1111
"name": "test.txt",
12-
"local_path": "/Users/bgrande/Repos/py-dcqc/tests/data/test.txt"
12+
"local_path": "tests/data/test.txt"
1313
}
1414
]
1515
}

tests/data/test.computed.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"type": "TIFF",
1616
"name": "test.txt",
17-
"local_path": "/Users/bgrande/Repos/py-dcqc/tests/data/test.txt"
17+
"local_path": "tests/data/test.txt"
1818
}
1919
]
2020
}

tests/data/test.external.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"type": "TIFF",
1616
"name": "test.txt",
17-
"local_path": "/Users/bgrande/Repos/py-dcqc/tests/data/test.txt"
17+
"local_path": "tests/data/test.txt"
1818
}
1919
]
2020
}

tests/data/test.internal.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"type": "TIFF",
1616
"name": "test.txt",
17-
"local_path": "/Users/bgrande/Repos/py-dcqc/tests/data/test.txt"
17+
"local_path": "tests/data/test.txt"
1818
}
1919
]
2020
}

tests/data/tests.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"type": "TIFF",
1717
"name": "test.txt",
18-
"local_path": "/Users/bgrande/Repos/py-dcqc/tests/data/test.txt"
18+
"local_path": "tests/data/test.txt"
1919
}
2020
]
2121
}
@@ -36,7 +36,7 @@
3636
},
3737
"type": "TIFF",
3838
"name": "test.txt",
39-
"local_path": "/Users/bgrande/Repos/py-dcqc/tests/data/test.txt"
39+
"local_path": "tests/data/test.txt"
4040
}
4141
]
4242
}
@@ -57,7 +57,7 @@
5757
},
5858
"type": "TIFF",
5959
"name": "test.txt",
60-
"local_path": "/Users/bgrande/Repos/py-dcqc/tests/data/test.txt"
60+
"local_path": "tests/data/test.txt"
6161
}
6262
]
6363
}

0 commit comments

Comments
 (0)