code: def test_ondisk():
      bs = BitSet([10, 11, 30, 50, 80])
  
      st = RamStorage()
      f = st.create_file("test")
      size = bs.to_disk(f)
      f.close()
  
      f = st.open_file("test")
      b = OnDiskBitSet(f, 0, size)
      assert list(b) == list(bs)
  
      assert b.after(0) == 10
      assert b.after(10) == 11
      assert b.after(80) is None
      assert b.after(99) is None
  
      assert b.before(0) is None
      assert b.before(99) == 80
      assert b.before(80) == 50
      assert b.before(10) is None
  
      f.seek(0)
      b = BitSet.from_disk(f, size)
      assert list(b) == list(bs)
  
file_path: whoosh/tests/test_bits.py
imports: from whoosh.filedb.filestore import RamStorage
  from whoosh.idsets import BitSet, OnDiskBitSet, SortedIntSet
label_desc: Use image node_id 11 for calling a global function with example usage: test_ondisk() without return types