Skip to content

Commit

Permalink
fixing old broken code, not fully
Browse files Browse the repository at this point in the history
At least no unclosed files, and no bytes instead of strings passed
  • Loading branch information
dimpase committed Oct 4, 2023
1 parent 81903a4 commit 8edb2a2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions testgdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def test_gdb(self):
logs = [os.path.join(self.crash_dir, fn)
for fn in os.listdir(self.crash_dir) if fn.endswith(".log")]
self.assertEqual(len(logs), 1)
log = open(logs[0]).read()

self.assertIn(b"Stack backtrace", log)
self.assertIn(b"Cython backtrace", log)
self.assertIn(b"__pyx_pf_9cysignals_5tests_46unguarded_dereference_null_pointer()", log)
self.assertIn(b"cdef void dereference_null_pointer() nogil:", log)
with open(logs[0]) as logf:
log = logf.read()
self.assertIn("Stack backtrace", log)
self.assertIn("Cython backtrace", log)
self.assertIn("unguarded_dereference_null_pointer ()", log)
self.assertIn("cdef void dereference_null_pointer() noexcept nogil:", log)


if __name__ == '__main__':
Expand Down

0 comments on commit 8edb2a2

Please sign in to comment.