Skip to content

Commit 135b316

Browse files
committed
universal location of spec
1 parent ad72558 commit 135b316

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
# built documents.
4848
#
4949
# The short X.Y version.
50-
version = "0.9-prerelease"
50+
version = "1.0.0"
5151
# The full version, including alpha/beta/rc tags.
52-
release = "0.9-prerelease"
52+
release = "1.0.0"
5353

5454
# The language for content autogenerated by Sphinx. Refer to documentation
5555
# for a list of supported languages.

histogrammar/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import re
1818

19-
__version__ = "0.9-prerelease"
19+
__version__ = "1.0.0"
2020

2121
version = __version__
2222

test/testspec.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
import math
1919
import sys
2020
import unittest
21+
import urllib2
2122

2223
from histogrammar import *
24+
import histogrammar.version
2325

2426
tolerance = 1e-12
2527
util.relativeTolerance = tolerance
@@ -40,14 +42,23 @@ def compare(self, x, y, name):
4042
self.assertEqual(Factory.fromJson(x), Factory.fromJson(y))
4143

4244
def runTest(self):
43-
testdata = json.load(open("../histogrammar-multilang/test-data.json"))
45+
sys.stdout.write("Downloading expected results, generated by specification {0}...\n".format(histogrammar.version.specification))
46+
try:
47+
testdata = json.load(urllib2.urlopen("http://histogrammar.org/test/{0}/test-data.json".format(histogrammar.version.specification)))
48+
except Exception as err:
49+
sys.stdout.write("could not download http://histogrammar.org/test/{0}/test-data.json\nbecause of {1}: {2}\n".format(histogrammar.version.specification, err.__class__.__name__, str(err)))
50+
return
51+
try:
52+
testresults = json.load(urllib2.urlopen("http://histogrammar.org/test/{0}/test-results.json".format(histogrammar.version.specification)))
53+
except Exception as err:
54+
sys.stdout.write("could not download http://histogrammar.org/test/{0}/test-results.jsonbecause of {1}: {2}\n\n".format(histogrammar.version.specification, err.__class__.__name__, str(err)))
55+
return
56+
4457
for x in testdata:
4558
for k, v in x.items():
4659
if k != "strings" and v in ("nan", "inf", "-inf"):
4760
x[k] = float(v)
4861

49-
testresults = json.load(open("../histogrammar-multilang/test-results.json"))
50-
5162
def stripNames(x):
5263
if hasattr(x, "quantity"):
5364
x.quantity.name = None

0 commit comments

Comments
 (0)