Example #1
0
 def test_copy_bypath(self):
     ffv = UMFile.from_file(COMMON_N48_TESTDATA_PATH)
     with self.temp_filename() as temp_path:
         ffv.to_file(temp_path)
         assert os.path.exists(temp_path)
         # Read it back and repeat our basic "known content" tests
         ffv_rb = UMFile.from_file(temp_path)
         check_common_n48_testdata(self, ffv_rb)
Example #2
0
 def test_read_fieldsfile(self):
     ffv = FieldsFile.from_file(COMMON_N48_TESTDATA_PATH)
     self.assertEqual(type(ffv), FieldsFile)
     check_common_n48_testdata(self, ffv)
Example #3
0
 def test_byfile(self):
     with open(COMMON_N48_TESTDATA_PATH) as open_file:
         ffv = UMFile.from_file(open_file)
     self.assertEqual(type(ffv), UMFile)
     check_common_n48_testdata(self, ffv)
Example #4
0
 def test_bypath(self):
     ffv = UMFile.from_file(COMMON_N48_TESTDATA_PATH)
     self.assertEqual(type(ffv), UMFile)
     check_common_n48_testdata(self, ffv)
 def test_fieldsfile_byfile(self):
     with open(COMMON_N48_TESTDATA_PATH) as open_file:
         ffv = load_umfile(open_file)
     self.assertEqual(type(ffv), FieldsFile)
     check_common_n48_testdata(self, ffv)
 def test_fieldsfile_bypath(self):
     ffv = load_umfile(COMMON_N48_TESTDATA_PATH)
     self.assertEqual(type(ffv), FieldsFile)
     check_common_n48_testdata(self, ffv)