File: better_is_fs_case_sensitive

package info (click to toggle)
python-schema-salad 8.4.20230213094415-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,440 kB
  • sloc: python: 14,250; cs: 1,771; java: 1,243; makefile: 189; xml: 184; sh: 108; javascript: 46
file content (25 lines) | stat: -rw-r--r-- 848 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
From: Michael R. Crusoe <michael.crusoe@gmail.com>
Subject: allow test to work post-installation
Forwarded: not-needed
--- 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: str,
 ) -> 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())
 
 
@@ -179,7 +178,7 @@
 def test_fetch_inject_id() -> None:
     path = get_data("tests/inject-id1.yml")
     assert path
-    if is_fs_case_sensitive(os.path.dirname(path)):
+    if is_fs_case_sensitive():
 
         def lower(item: str) -> str:
             return item