def test_src_txt_immutability(self): """ Attempting to set `refmanage.NonbibFile.src_txt` should raise AttributeError """ b = NonbibFile(self.invalid) try: b.src_txt = "legitimate text string" except AttributeError: # Attempting to set `path` attribute raises an error; test passed! pass else: self.fail("NonbibFile.src_txt can be set after instantiation")