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 == []
def test_equality_fails(self): assert apt.read('test data/EmptyIRDoc.axd') == apt.read( 'BG_Full_stepped_test1.irb')
def test_check_equality(self, filename): assert apt.read(filename) == apt.read(filename)
def test_basic_read(self, filename): f = apt.read(filename)
def test_basic_read(self, filename): f = apt.read(filename) assert f is not None assert isinstance(f, apt.anasysdoc.AnasysDoc)
def test_check_attributes(self, filename): f = apt.read(filename) assert hasattr(f, "wn") assert hasattr(f, "signal")
def test_basic_read(self, filename): f = apt.read(filename) assert f is not None assert isinstance(f, apt.irspectra.Background)