File: 01_dont_use_module_as_nonrar_file.diff

package info (click to toggle)
python-rarfile 4.2-3~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports-sloppy
  • size: 2,312 kB
  • sloc: python: 4,180; makefile: 186; sh: 59; awk: 14
file content (16 lines) | stat: -rw-r--r-- 521 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Avoid having to list/copy the module itself as a pybuild testfile
# only because the testsuite/autopkgtest needs some non-rar file
--- a/test/test_api.py
+++ b/test/test_api.py
@@ -15,9 +15,9 @@
 
 def test_not_rar():
     with pytest.raises(rarfile.NotRarFile):
-        rarfile.RarFile("rarfile.py", "r")
+        rarfile.RarFile(__file__, "r")
     with pytest.raises(rarfile.NotRarFile):
-        with open("rarfile.py", "rb") as f:
+        with open(__file__, "rb") as f:
             rarfile.RarFile(f, "r")