CLIMATE-456 - Move DAP test initialization to setup_class - Move OpenDAP test initialization to setup_class method. This also seems to fix the issue with nose-exclude not ignoring the test_dap file when instructed to - Rename the test class to fall inline with project naming standards.
Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/2e0cd113 Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/2e0cd113 Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/2e0cd113 Branch: refs/heads/master Commit: 2e0cd1139ea46a1c5af9f776b9d8366ed040a8bf Parents: e9437d0 Author: Michael Joyce <[email protected]> Authored: Wed Jun 4 12:06:27 2014 -0700 Committer: Michael Joyce <[email protected]> Committed: Wed Jun 4 12:06:27 2014 -0700 ---------------------------------------------------------------------- ocw/tests/test_dap.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/2e0cd113/ocw/tests/test_dap.py ---------------------------------------------------------------------- diff --git a/ocw/tests/test_dap.py b/ocw/tests/test_dap.py index ed0afaf..cdc75cd 100644 --- a/ocw/tests/test_dap.py +++ b/ocw/tests/test_dap.py @@ -20,8 +20,10 @@ import ocw.data_source.dap as dap from ocw.dataset import Dataset import datetime as dt -class test_dap(unittest.TestCase): - dataset = dap.load('http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz', 'sst') +class TestDap(unittest.TestCase): + @classmethod + def setup_class(self): + dataset = dap.load('http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz', 'sst') def test_dataset_is_returned(self): self.assertTrue(isinstance(self.dataset, Dataset))
