コード例 #1
0
 def test_file_lengths_after_reading_and_writing_back_to_axd(self, tempdir):
     failures = []
     files = get_anasys_files_in_test_data_folder()
     for f in files:
         line_count_1 = get_line_count(open_file(f))
         temp = anasys.read(f)
         temppath = os.path.join(tempdir, os.path.basename(f)[:-3] + 'axd')
         temp.write(temppath)
         # make output individual files
         line_count_2 = get_line_count(open_file(temppath))
         if line_count_1 != line_count_2:
             failures.append(
                 'FAIL: {} (input lines: {}, output lines: {})'.format(
                     f, line_count_1, line_count_2))
     assert failures == []
コード例 #2
0
 def test_equality_fails(self):
     assert apt.read('test data/EmptyIRDoc.axd') == apt.read(
         'BG_Full_stepped_test1.irb')
コード例 #3
0
 def test_check_equality(self, filename):
     assert apt.read(filename) == apt.read(filename)
コード例 #4
0
 def test_basic_read(self, filename):
     f = apt.read(filename)
コード例 #5
0
 def test_basic_read(self, filename):
     f = apt.read(filename)
     assert f is not None
     assert isinstance(f, apt.anasysdoc.AnasysDoc)
コード例 #6
0
 def test_check_attributes(self, filename):
     f = apt.read(filename)
     assert hasattr(f, "wn")
     assert hasattr(f, "signal")
コード例 #7
0
 def test_basic_read(self, filename):
     f = apt.read(filename)
     assert f is not None
     assert isinstance(f, apt.irspectra.Background)