Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _test_conversion(self, stack):
for path in self.files:
with self.subTest(id=path[-8:-4]):
pdbx_file = pdbx.PDBxFile()
pdbx_file.read(path)
if stack:
array1 = pdbx.get_structure(pdbx_file)
else:
array1 = pdbx.get_structure(pdbx_file, model=1)
pdbx.set_structure(pdbx_file, array1)
if stack:
array2 = pdbx.get_structure(pdbx_file)
else:
array2 = pdbx.get_structure(pdbx_file, model=1)
self.assertEqual(array1, array2)
def _test_conversion(self, stack):
for path in self.files:
with self.subTest(id=path[-8:-4]):
pdbx_file = pdbx.PDBxFile()
pdbx_file.read(path)
if stack:
array1 = pdbx.get_structure(pdbx_file)
else:
array1 = pdbx.get_structure(pdbx_file, model=1)
pdbx.set_structure(pdbx_file, array1)
if stack:
array2 = pdbx.get_structure(pdbx_file)
else:
array2 = pdbx.get_structure(pdbx_file, model=1)
self.assertEqual(array1, array2)
def _test_conversion(self, stack):
for path in self.files:
with self.subTest(id=path[-8:-4]):
pdbx_file = pdbx.PDBxFile()
pdbx_file.read(path)
if stack:
array1 = pdbx.get_structure(pdbx_file)
else:
array1 = pdbx.get_structure(pdbx_file, model=1)
pdbx.set_structure(pdbx_file, array1)
if stack:
array2 = pdbx.get_structure(pdbx_file)
else:
array2 = pdbx.get_structure(pdbx_file, model=1)
self.assertEqual(array1, array2)