예제 #1
0
 def test_dump_mappings(self):
     s = Script("cmdline.Script --ignore-cache")
     s.dump_mappings(["hst_acs.imap"])
예제 #2
0
 def test_resolve_context_operational(self):
     s = Script("cmdline.Script --hst")
     context = s.resolve_context("hst-operational")
     assert context.startswith("hst_") and context.endswith(".pmap"), context
예제 #3
0
 def test_file_outside_cache_uri(self):
     """Explicit crds:// notation for files inside cache."""
     s = Script("cmdline.Script --jwst")
     path = s.locate_file_outside_cache("crds://jwst_0001.pmap")
     assert path.endswith("crds-cache-test/mappings/jwst/jwst_0001.pmap"), path
예제 #4
0
 def test_file_outside_cache_mapping_spec(self):
     s = Script("cmdline.Script --hst")
     path = s.locate_file_outside_cache("hst-2016-01-01")
     assert path.endswith("crds-cache-test/mappings/hst/hst_0379.pmap"), path
예제 #5
0
 def test_file_outside_cache_pathless(self):
     s = Script("cmdline.Script")
     path = s.locate_file_outside_cache("hst_0001.pmap")
     assert path.endswith('./hst_0001.pmap'), path