Skip to content

Commit

Permalink
Use common location for all remote test data
Browse files Browse the repository at this point in the history
  • Loading branch information
krzywon committed Apr 23, 2024
1 parent 80f6739 commit 718d6ab
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/sasdataloader/utest_extension_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

logger = logging.getLogger(__name__)

BASE_URL = 'https://github.com/SasView/sasdata/raw/master/test/sasdataloader/data/'


def find(filename):
return os.path.join(os.path.dirname(__file__), 'data', filename)
Expand All @@ -24,23 +26,22 @@ def setUp(self):
# Local and remote files to compare loading
# NXcanSAS
self.valid_hdf_file = find("MAR07232_rest.h5")
self.valid_hdf_url = "https://github.com/SasView/sasdata/raw/master/test/sasdataloader/data/MAR07232_rest.h5"
self.valid_hdf_url = BASE_URL + "MAR07232_rest.h5"
# canSAS XML
self.valid_xml_file = find("valid_cansas_xml.xml")
self.valid_xml_url = "https://github.com/SasView/sasdata/raw/master/test/sasdataloader/data/valid_cansas_xml.xml"
self.valid_xml_url = BASE_URL + "valid_cansas_xml.xml"
# ASCII Text
self.valid_txt_file = find("avg_testdata.txt")
self.valid_txt_url = "https://github.com/SasView/sasdata/raw/master/test/sasdataloader/data/avg_testdata.txt"
self.valid_txt_url = BASE_URL + "avg_testdata.txt"
# ABS Text
self.valid_abs_file = find("ascii_test_4.abs")
self.valid_abs_url = "https://github.com/SasView/sasdata/raw/master/test/sasdataloader/data/ascii_test_4.abs"
self.valid_abs_url = BASE_URL + "ascii_test_4.abs"
# DAT 2D NIST format
self.valid_dat_file = find("detector_square.dat")
self.valid_dat_url = "https://github.com/SasView/sasdata/raw/master/test/sasdataloader/data/detector_square.dat"
self.valid_dat_url = BASE_URL + "detector_square.dat"
# Anton Parr SAXSess PDH format
# TODO: This should point to the sasdata package, but the file doesn't exist there yet.
self.valid_pdh_file = find("Anton-Paar.pdh")
self.valid_pdh_url = "https://github.com/SasView/sasview/raw/main/src/sas/example_data/1d_data/Anton-Paar.pdh"
self.valid_pdh_url = BASE_URL + "Anton-Paar.pdh"

self.valid_file_wrong_known_ext = find("valid_cansas_xml.txt")
self.valid_file_wrong_unknown_ext = find("valid_cansas_xml.xyz")
Expand Down

0 comments on commit 718d6ab

Please sign in to comment.