Compare commits

..

No commits in common. "main" and "v1.0.1" have entirely different histories.
main ... v1.0.1

5 changed files with 39 additions and 13 deletions

View File

@ -50,7 +50,7 @@ Tests
There's a simple but comprehensive test scenario using There's a simple but comprehensive test scenario using
`pytest <https://pypi.org/p/pytest>`_ and `pytest <https://pypi.org/p/pytest>`_ and
`pytest-order <https://pypi.org/p/pytest-order>`_. `pytest-order <https://pypi.org/p/pytest-order>`.
Install:: Install::

36
bin/bitrot Normal file
View File

@ -0,0 +1,36 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2013 by Łukasz Langa
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from multiprocessing import freeze_support
from bitrot import run_from_command_line
if __name__ == "__main__":
freeze_support()
run_from_command_line()

View File

@ -37,7 +37,6 @@ import time
import unicodedata import unicodedata
from concurrent.futures import ProcessPoolExecutor, as_completed from concurrent.futures import ProcessPoolExecutor, as_completed
from multiprocessing import freeze_support
from importlib.metadata import version, PackageNotFoundError from importlib.metadata import version, PackageNotFoundError
@ -516,8 +515,6 @@ def update_sha512_integrity(verbosity=1):
def run_from_command_line(): def run_from_command_line():
global FSENCODING global FSENCODING
freeze_support()
parser = argparse.ArgumentParser(prog='bitrot') parser = argparse.ArgumentParser(prog='bitrot')
parser.add_argument( parser.add_argument(
'-l', '--follow-links', action='store_true', '-l', '--follow-links', action='store_true',

View File

@ -337,12 +337,3 @@ def test_rotten_file_2() -> None:
) )
assert err[0].startswith(e) assert err[0].startswith(e)
assert err[1] == "error: There were 1 errors found." assert err[1] == "error: There were 1 errors found."
@pytest.mark.order("last")
def test_cleanup() -> None:
username = getpass.getuser()
test_dir = TMP / f"bitrot-dir-{username}"
if test_dir.is_dir():
os.chdir(TMP)
shutil.rmtree(test_dir)

View File

@ -0,0 +1,2 @@
pytest
pytest-order