Tinche / aiofiles

File support for asyncio
Apache License 2.0
2.66k stars 150 forks source link

Add aiofiles.os.symlink function #124

Closed jpy-git closed 2 years ago

jpy-git commented 2 years ago

The os module in the stdlib provides a function called os.symlink that creates a symlink to the src file. This PR adds the async version of that.

Docs: https://docs.python.org/3/library/os.html#os.symlink

I've added the relevant unit test in test_os.py, plus updated the aiofiles.os.link test to better differentiate the two.

codecov-commenter commented 2 years ago

Codecov Report

Merging #124 (554e090) into master (db6c5be) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #124      +/-   ##
==========================================
+ Coverage   89.66%   89.70%   +0.03%     
==========================================
  Files          10       10              
  Lines         300      301       +1     
==========================================
+ Hits          269      270       +1     
  Misses         31       31              
Impacted Files Coverage Δ
src/aiofiles/os.py 100.00% <100.00%> (ø)

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 db6c5be...554e090. Read the comment docs.

Tinche commented 2 years ago

You're on quite a roll! Thanks.