Skip to content

Commit

Permalink
fix: debug test
Browse files Browse the repository at this point in the history
  • Loading branch information
ACornuIGN committed Dec 22, 2023
1 parent 72e9b6e commit d336596
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ci/test_writer.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python3 -m pytest -s ./test/test_writer -v
python3 -m pytest -s ./test/test_writer.py -v
10 changes: 5 additions & 5 deletions src/writer/writer_opk.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
from src.datastruct.worksite import Worksite


def write(path: str, work: Worksite) -> None:
def write(path_opk: str, work: Worksite) -> None:
"""
Write function, to save a photogrammetric site in .opk format
Args:
path (str): Path of registration file.
path_opk (str): Path of registration file .opk.
work (Worksite): The site to be recorded.
"""
path = os.path.join(path, f"{work.name}.opk")
path_opk = os.path.join(path_opk, f"{work.name}.opk")

try:
with open(path, "w", encoding="utf-8") as file:
with open(path_opk, "w", encoding="utf-8") as file:
file.write("NOM X Y Z O P K CAMERA")
for shot in work.shots:
file.write("\n")
Expand All @@ -30,4 +30,4 @@ def write(path: str, work: Worksite) -> None:
shot.name_cam)
file.close()
except FileNotFoundError as e:
raise ValueError("The path doesn't exist !!!") from e
raise ValueError("The path doesn't exist !!!", e) from e

0 comments on commit d336596

Please sign in to comment.