Skip to content

Commit 92d4fab

Browse files
committed
Clean up some comments
1 parent e8edb52 commit 92d4fab

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Lib/test/test_site.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ def test_addpackage(self):
125125
# comment or import that is a valid directory name for where the .pth
126126
# file resides; invalid directories are not added
127127
pth_file = PthFile()
128-
pth_file.cleanup(prep=True) # to make sure that nothing is
129-
# pre-existing that shouldn't be
128+
# Ensure we have a clean slate.
129+
pth_file.cleanup(prep=True)
130130
with pth_file.create():
131131
site.addpackage(pth_file.base_dir, pth_file.filename, set())
132132
self.pth_file_tests(pth_file)
@@ -180,6 +180,7 @@ def test_addsitedir(self):
180180
# addsitedir() reads .pth files and, when called standalone
181181
# (known_paths=None), flushes paths and import lines immediately.
182182
pth_file = PthFile()
183+
# Ensure we have a clean slate.
183184
pth_file.cleanup(prep=True)
184185
with pth_file.create():
185186
site.addsitedir(pth_file.base_dir)
@@ -203,6 +204,7 @@ def test_addsitedir_explicit_flush(self):
203204

204205
def test_addsitedir_dotfile(self):
205206
pth_file = PthFile('.dotfile')
207+
# Ensure we have a clean slate.
206208
pth_file.cleanup(prep=True)
207209
with pth_file.create():
208210
site.addsitedir(pth_file.base_dir)
@@ -212,6 +214,7 @@ def test_addsitedir_dotfile(self):
212214
@unittest.skipUnless(hasattr(os, 'chflags'), 'test needs os.chflags()')
213215
def test_addsitedir_hidden_flags(self):
214216
pth_file = PthFile()
217+
# Ensure we have a clean slate.
215218
pth_file.cleanup(prep=True)
216219
with pth_file.create():
217220
st = os.stat(pth_file.file_path)
@@ -224,6 +227,7 @@ def test_addsitedir_hidden_flags(self):
224227
@support.requires_subprocess()
225228
def test_addsitedir_hidden_file_attribute(self):
226229
pth_file = PthFile()
230+
# Ensure we have a clean slate.
227231
pth_file.cleanup(prep=True)
228232
with pth_file.create():
229233
subprocess.check_call(['attrib', '+H', pth_file.file_path])

0 commit comments

Comments
 (0)