File: 0005-Adapt-path-argument-of-example-files.patch

package info (click to toggle)
python-spdx-tools 0.8.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,088 kB
  • sloc: python: 18,668; xml: 12,553; sh: 46; makefile: 6
file content (31 lines) | stat: -rw-r--r-- 1,037 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: =?utf-8?q?Santiago_Ruano_Rinc=C3=B3n?= <santiagorr@riseup.net>
Date: Fri, 24 Oct 2025 13:47:52 -0300
Subject: Adapt path argument of example files

An ugly hack so these example files can be found in their actual place from the
sbuild building environment.
---
 tests/spdx/examples/test_examples.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/spdx/examples/test_examples.py b/tests/spdx/examples/test_examples.py
index 95de855..73898ef 100644
--- a/tests/spdx/examples/test_examples.py
+++ b/tests/spdx/examples/test_examples.py
@@ -1,6 +1,7 @@
 #  SPDX-FileCopyrightText: 2023 spdx contributors
 #
 #  SPDX-License-Identifier: Apache-2.0
+import os
 import os.path
 import runpy
 
@@ -18,7 +19,7 @@ def cleanup_output_files():
 
 
 def run_example(example_file: str):
-    file_path = os.path.join(os.path.dirname(__file__), "../../../examples/", example_file)
+    file_path = os.path.join(os.path.dirname(__file__), "../../../../../../examples/", example_file)
     runpy.run_path(file_path)