Skip to content

Commit 1248d8b

Browse files
committed
Use NamedTemporaryFile, not TemporaryDirectory
1 parent 92557d4 commit 1248d8b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/openfermion/chem/molecular_data_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ def test_missing_calcs_for_integrals(self):
352352

353353
def test_load_no_general_calculations(self):
354354
# Make fake molecule.
355-
with tempfile.TemporaryDirectory() as tmp_dir:
356-
filename = os.path.join(tmp_dir, 'test_molecule.hdf5')
355+
with tempfile.NamedTemporaryFile(suffix='.hdf5') as tmp_file:
356+
filename = tmp_file.name
357357
geometry = [('H', (0.0, 0.0, 0.0)), ('H', (0.0, 0.0, 0.7414))]
358358
basis = '6-31g*'
359359
multiplicity = 1

0 commit comments

Comments
 (0)