7
7
# more tests in sphinx/weave!
8
8
9
9
def test_paths ():
10
- path = "~/Projects/clustering-data-v1/"
10
+ path = "~/Projects/clustering-data-v1"
11
+ path = os .path .expanduser (path )
12
+
11
13
if os .path .exists (path ):
12
14
assert "wut" in clustbench .get_battery_names (path )
13
15
assert "x1" in clustbench .get_dataset_names ("wut" , path )
@@ -16,12 +18,14 @@ def test_paths():
16
18
assert "wut" in clustbench .get_battery_names ()
17
19
assert "x1" in clustbench .get_dataset_names ("wut" )
18
20
19
- assert "wut" in clustbench .get_battery_names ("../clustering-data-v1/" )
20
- assert "x1" in clustbench .get_dataset_names ("wut" , "../clustering-data-v1/" )
21
+ assert "wut" in clustbench .get_battery_names (path )
22
+ assert "x1" in clustbench .get_dataset_names ("wut" , path )
23
+
24
+ assert clustbench .load_dataset ("wut" , "x2" ).data .flags ["C_CONTIGUOUS" ]
21
25
22
- assert len (clustbench .load_dataset ("wut" , "x2" , "../clustering-data-v1/" )[ " labels" ] ) == 2
26
+ assert len (clustbench .load_dataset ("wut" , "x2" ). labels ) == 2
23
27
24
- assert len (clustbench .assertload_dataset ("wut" , "x2" , url = "https://github.com/gagolews/clustering-data-v1/raw/v1.1.0" )[ " labels" ] ) == 2
28
+ assert len (clustbench .load_dataset ("wut" , "x2" , url = "https://github.com/gagolews/clustering-data-v1/raw/v1.1.0" ). labels ) == 2
25
29
26
30
27
31
if __name__ == "__main__" :
0 commit comments