Skip to content

Commit fabd548

Browse files
mportesdevsebastinas
authored andcommitted
Fix Python 2.7 TypeError in test_save
1 parent 9d17172 commit fabd548

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bpython/test/test_history.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ def test_append_reload_and_write(self):
112112
self.assertEqual(history.entries, ['#1', '#2', '#3', '#4'])
113113

114114
def test_save(self):
115-
history = History(['#1', '#2', '#3', '#4'])
115+
history = History()
116+
history.entries = []
117+
for line in ['#1', '#2', '#3', '#4']:
118+
history.append_to(history.entries, line)
116119

117120
# save only last 2 lines
118121
history.save(self.filename, self.encoding, lines=2)

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