File: fixed-path-file-tests.patch

package info (click to toggle)
mapclassify 2.8.1-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,632 kB
  • sloc: python: 2,521; makefile: 44; lisp: 7
file content (26 lines) | stat: -rw-r--r-- 854 bytes parent folder | download | duplicates (2)
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
Description: Fixed file path for tests
Author: Josenilson Ferreira da Silva <nilsonfsilva@hotmail.com>
Forwarded:  not-needed
Last-Update: 2024-07-06
Index: mapclassify/mapclassify/tests/test_classify.py
===================================================================
--- mapclassify.orig/mapclassify/tests/test_classify.py
+++ mapclassify/mapclassify/tests/test_classify.py
@@ -4,6 +4,8 @@ import pytest
 
 import mapclassify
 
+from pathlib import Path
+
 
 def _assertions(a, b):
     assert a.k == b.k
@@ -14,7 +16,7 @@ def _assertions(a, b):
 
 class TestClassify:
     def setup_method(self):
-        link_to_data = libpysal.examples.get_path("columbus.shp")
+        link_to_data = Path("/usr/share/doc/python3-libpysal/examples/columbus/columbus.shp")
         gdf = geopandas.read_file(link_to_data)
         self.x = gdf["HOVAL"].values