eric-wieser / numpy_ringbuffer

Ring-buffer implementation that thinly wraps a numpy array
https://pypi.python.org/pypi/numpy_ringbuffer/
MIT License
89 stars 16 forks source link

Fixes issues of unsafe memory access #15

Open fpdotmonkey opened 4 years ago

fpdotmonkey commented 4 years ago

This adds the tests test_raises_error_indexing_empty_buffer and test_negative_indices_give_recent_data_with_unfull_buffer to ensure the class doesn't access memory unsafely.

Closes #13 Closes #14

codecov-commenter commented 4 years ago

Codecov Report

Merging #15 into master will increase coverage by 0.07%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #15      +/-   ##
==========================================
+ Coverage   98.49%   98.57%   +0.07%     
==========================================
  Files           3        3              
  Lines         266      280      +14     
==========================================
+ Hits          262      276      +14     
  Misses          4        4              
Impacted Files Coverage Δ
numpy_ringbuffer/__init__.py 98.33% <100.00%> (+0.05%) :arrow_up:
tests.py 98.74% <100.00%> (+0.08%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5b4898e...6419640. Read the comment docs.