File: 0002-Fix-file-path-for-tests.patch

package info (click to toggle)
python-pyshortcuts 1.9.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,652 kB
  • sloc: python: 1,286; makefile: 43
file content (27 lines) | stat: -rw-r--r-- 812 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
From: Roland Mas <roland.mas@entierement.net>
Date: Sun, 15 Feb 2026 18:07:56 +0100
Subject: Fix file path for tests

---
 tests/test_pyshortcuts.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_pyshortcuts.py b/tests/test_pyshortcuts.py
index d6fdbc2..f95ac1a 100644
--- a/tests/test_pyshortcuts.py
+++ b/tests/test_pyshortcuts.py
@@ -94,12 +94,12 @@ def test_pathname():
         assert len(pathname(p)) > 3
 
 def test_read_textfile():
-    fname = 'textfile.dat'
+    fname = 'tests/textfile.dat'
     out = read_textfile(fname)
     assert len(out) > 15
     assert isinstance(out, str)
 
-    fstream = open('textfile.dat', 'r')
+    fstream = open('tests/textfile.dat', 'r')
     out = read_textfile(fstream)
     assert len(out) > 15
     assert isinstance(out, str)