destream-py / destream

A tool & Python 3 library to decompress anything
GNU General Public License v2.0
12 stars 1 forks source link

Convert all tests to pytest #27

Closed eumiro closed 3 years ago

eumiro commented 3 years ago

Converted all tests to pytest.

There are still three issues:

  1. test_30_zip_single_file fails for file/libmagic 5.39, marked it as xfail for now, discussed in #20
  2. test_20_passing_file_name was identical to test_10_passing_file_object, so I changed it according to its title and it should pass, but doesn't; but since I am not sure what it should do exactly, it's okay to xfail
  3. test_40_7z_multiple_files fails because a test file cannot be found. I converted most(?) temporary files to pytest's tmp_path fixture, so they go to /tmp/pytest-of-$USER/ and can be found after the test is over, but there is still some problem with filenames in ArchiveTemp, so I'll have to look into it. This is also an excellent reason to use pathlib.Path everywhere the file system is touched

If you have any questions, please feel free to discuss them, I am still discovering some dark corners of pytest.

eumiro commented 3 years ago

Closes #21

cecton commented 3 years ago

Oh I just noticed the coverage disappeared. Maybe it broke when I moved the repo.

eumiro commented 3 years ago

I have now added a new commit with renamed test functions. Please review and give any better name. I'll change it then accordingly and at the end squash all commits.

(because who would ever type removel into a commit message anyway :facepalm:)

cecton commented 3 years ago

I'll change it then accordingly and at the end squash all commits.

omg I didn't mean to criticize you already do nice clean commits I AM SO SORRY 🙏