cleaning test files

This commit is contained in:
Andy Eschbacher
2016-09-21 12:01:42 -04:00
parent e5ea836493
commit 795413e46d
3 changed files with 3 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
\pset format unaligned
\set ECHO all
\i test/fixtures/ppoints.sql
\i test/fixtures/getis_data.sql
SET client_min_messages TO WARNING;
\set ECHO none
_cdb_random_seeds

View File

@@ -3,20 +3,16 @@ SET client_min_messages TO WARNING;
--
-- Getis-Ord's G* test dataset, subsetted from PySAL examples:
-- https://github.com/pysal/pysal/tree/952ea04029165048a774d9a1846cf86ad000c096/pysal/examples/stl
-- https://github.com/pysal/pysal/tree/952ea04029165048a774d9a1846cf86ad000c096/pysal/examples/stl
--
CREATE TABLE getis_data (
cartodb_id integer,
the_geom geometry(Geometry,4326),
hr8893 numeric
hr8893 numeric
);
ALTER TABLE getis_data OWNER TO contrib_regression;
COPY getis_data (cartodb_id, the_geom, hr8893) FROM stdin;
22 0106000020E61000000100000001030000000100000007000000000000E0B10056C0000000C0B8964340FFFFFFFF4C1756C00000002054964340000000A00F1E56C00000004072964340000000C02D1E56C0000000A0439B434000000060381E56C00000000036B04340000000E0E20056C0000000608CB04340000000E0B10056C0000000C0B8964340 10.8557430000000004
32 0106000020E6100000010000000103000000010000000B000000FFFFFF1FC26656C0FFFFFFBFE25E4340000000A0D86656C0000000E0976F4340000000A03A6956C0000000C0966F434000000020526956C0000000E08A7F4340000000E0F26556C000000000C87F4340000000E0066656C0000000209C834340000000407F5056C0000000803C83434000000020635056C0000000E016814340000000A0F45056C0000000A0F980434000000060D25056C000000060FA5E4340FFFFFF1FC26656C0FFFFFFBFE25E4340 9.92424500000000087
@@ -100,4 +96,3 @@ COPY getis_data (cartodb_id, the_geom, hr8893) FROM stdin;
CREATE INDEX getis_data_gix ON getis_data USING GIST(the_geom);

View File

@@ -72,5 +72,3 @@ class GetisTest(unittest.TestCase):
expected = np.array(self.getis_data)[:, 0:2]
for ([res_z, res_p], [exp_z, exp_p]) in zip(result, expected):
self.assertAlmostEqual(res_z, exp_z, delta=1e-2)
if exp_p <= 0.05:
self.assertTrue(res_p < 0.05)