Don't leave dangling file descriptor in selftest
authorJeremy Stanley <fungi@yuggoth.org>
Sat, 17 Apr 2021 15:59:18 +0000 (15:59 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sat, 17 Apr 2021 15:59:18 +0000 (15:59 +0000)
commit787d1bc42c8b9cde309709f520e254e66a23ff8d
tree8970830ee2aa8bcc4dd4bacc066246567b830e1b
parent8c920b5c4b87fd8b54fd566c462c47f9e7f47693
Don't leave dangling file descriptor in selftest

Use context management when opening the configuration file in
selftests so that its file descriptor will be cleaned up as soon as
loading completes.
mudpy/tests/selftest.py