Skip to content

Commit

Permalink
test: update rootdir testdata discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Aug 25, 2023
1 parent 699438d commit 27aca90
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/test_conflation.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
rootdir = os.path.basename(os.getcwd())
if rootdir == 'tests':
rootdir = "."
elif rootdir == 'main':
rootdir = os.getcwd() + "/tests"
else:
rootdir = rootdir + "/tests"

parser = argparse.ArgumentParser(description="Test odk_merge")
parser.add_argument("--odk", default=f"{rootdir}/testdata/odk_pois.osm", help="The ODK file")
Expand Down
6 changes: 3 additions & 3 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
rootdir = os.path.basename(os.getcwd())
if rootdir == 'tests':
rootdir = "."
elif rootdir == 'main':
rootdir = os.getcwd() + "/tests"
else:
rootdir = rootdir + "/tests"

parser = argparse.ArgumentParser(
description="Read and convert a JSON file from ODK Central"
)
parser.add_argument("--infile", default=f"{rootdir}testdata/testcamps.json", help="The JSON input file")
parser.add_argument("--infile", default=f"{rootdir}/testdata/testcamps.json", help="The JSON input file")
args = parser.parse_args()

path = xlsforms_path.replace("/xlsforms", "")
Expand Down
4 changes: 2 additions & 2 deletions tests/test_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
rootdir = os.path.basename(os.getcwd())
if rootdir == 'tests':
rootdir = "."
elif rootdir == 'main':
rootdir = os.getcwd() + "/tests"
else:
rootdir = rootdir + "/tests"

parser = argparse.ArgumentParser(
description="Read and parse a CSV file from ODK Central"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_osm.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
rootdir = os.path.basename(os.getcwd())
if rootdir == 'tests':
rootdir = "."
elif rootdir == 'main':
rootdir = os.getcwd() + "/tests"
else:
rootdir = rootdir + "/tests"

parser = argparse.ArgumentParser(
description="Read and parse a CSV file from ODK Central"
Expand Down

0 comments on commit 27aca90

Please sign in to comment.