File: better_is_fs_case_sensitive

package info (click to toggle)
python-schema-salad 8.9.20250408123006-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,056 kB
  • sloc: python: 19,177; cpp: 2,631; cs: 1,869; java: 1,341; makefile: 187; xml: 184; sh: 103; javascript: 46
file content (31 lines) | stat: -rw-r--r-- 970 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: "Michael R. Crusoe" <michael.crusoe@gmail.com>
Date: Fri, 16 Jun 2023 12:26:33 -0400
Subject: allow test to work post-installation

Forwarded: not-needed
---
 schema_salad/tests/test_ref_resolver.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- python-schema-salad.orig/schema_salad/tests/test_ref_resolver.py
+++ python-schema-salad/schema_salad/tests/test_ref_resolver.py
@@ -20,9 +20,8 @@
 
 
 def is_fs_case_sensitive(
-    path: Path,
 ) -> bool:  # https://stackoverflow.com/a/36612604/1585509
-    with tempfile.NamedTemporaryFile(prefix="TmP", dir=path) as tmp_file:
+    with tempfile.NamedTemporaryFile(prefix="TmP") as tmp_file:
         return not os.path.exists(tmp_file.name.lower())
 
 
@@ -178,7 +177,7 @@
 
 def test_fetch_inject_id() -> None:
     path = get_path("tests/inject-id1.yml")
-    if is_fs_case_sensitive(path.parent):
+    if is_fs_case_sensitive():
 
         def lower(item: str) -> str:
             return item