Example #1
0
 def test_dump_mappings(self):
     s = Script("cmdline.Script --ignore-cache")
     s.dump_mappings(["hst_acs.imap"])
Example #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
Example #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
Example #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
Example #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