Skip to content

Commit a108ee1

Browse files
fix run order-dependant test failure
1 parent 599cfea commit a108ee1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bpython/test/test_curtsies_repl.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
from bpython.test import (FixLanguageTestCase as TestCase, MagicIterMock, mock,
2121
builtin_target, unittest)
2222

23+
if py3:
24+
from importlib import invalidate_caches
25+
else:
26+
def invalidate_caches():
27+
"""Does not exist before Python 3.3"""
28+
2329

2430
def setup_config(conf):
2531
config_struct = config.Struct()
@@ -291,6 +297,7 @@ def setUp(self):
291297
self.open = partial(io.open, mode='wt', encoding='utf-8')
292298
self.dont_write_bytecode = sys.dont_write_bytecode
293299
sys.dont_write_bytecode = True
300+
invalidate_caches()
294301

295302
def tearDown(self):
296303
sys.dont_write_bytecode = self.dont_write_bytecode

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy