Coder Social home page Coder Social logo

djwf / mail-deduplicate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kdeldycke/mail-deduplicate

0.0 0.0 0.0 1.66 MB

:e-mail: CLI to deduplicate mails from maildir folders.

Home Page: https://maildir-deduplicate.readthedocs.io

License: GNU General Public License v2.0

Python 100.00%

mail-deduplicate's People

Contributors

arvendofloh avatar aspiers avatar baip avatar breser avatar dependabot[bot] avatar dfukagaw28 avatar jepler avatar juantascon avatar kdeldycke avatar kdm9 avatar krig avatar leggewie avatar marcelm avatar mnalis avatar painted-fox avatar pechfunk avatar reedog117 avatar tnhh avatar

Watchers

 avatar  avatar

mail-deduplicate's Issues

Test for message age differences fails

================================================== test session starts ==================================================
platform linux -- Python 3.8.2, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /home/dave/usr/src/maildir-deduplicate.git, inifile: setup.cfg
plugins: cov-2.8.1
collected 7 items / 1 error / 6 selected                                                                                

======================================================== ERRORS =========================================================
____________________________ ERROR collecting maildir_deduplicate/tests/test_deduplicate.py _____________________________
maildir_deduplicate/tests/test_deduplicate.py:287: in <module>
    class TestDateStrategy(TestDeduplicate):
maildir_deduplicate/tests/test_deduplicate.py:292: in TestDateStrategy
    newer_date = newest_date.replace(minutes=-1)
../../local/miniconda3/envs/maildir-dedupe/lib/python3.8/site-packages/arrow/arrow.py:622: in replace
    raise AttributeError('unknown attribute: "{}"'.format(key))
E   AttributeError: unknown attribute: "minutes"

----------- coverage: platform linux, python 3.8.2-final-0 -----------
Name                                 Stmts   Miss Branch BrPart     Cover
-------------------------------------------------------------------------
maildir_deduplicate/__init__.py         43     10      6      0    67.35%
maildir_deduplicate/cli.py              79     45     22      0    33.66%
maildir_deduplicate/deduplicate.py     253    204     98      0    13.96%
maildir_deduplicate/mail.py            126     97     56      0    15.93%
-------------------------------------------------------------------------
TOTAL                                  501    356    182      0    21.23%

================================================ short test summary info ================================================
ERROR maildir_deduplicate/tests/test_deduplicate.py - AttributeError: unknown attribute: "minutes"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================== 1 error in 0.39s ====================================================

Multiple tests fail in CLI test

================================================== test session starts ==================================================
platform linux -- Python 3.8.2, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /home/dave/usr/src/maildir-deduplicate.git, inifile: setup.cfg
plugins: cov-2.8.1
collected 20 items                                                                                                      

maildir_deduplicate/tests/test_cli.py ..F.F..                                                                     [ 35%]
maildir_deduplicate/tests/test_deduplicate.py .............                                                       [100%]

======================================================= FAILURES ========================================================
____________________________________ TestDeduplicateCLI.test_invalid_maildir_as_file ____________________________________

self = <maildir_deduplicate.tests.test_cli.TestDeduplicateCLI testMethod=test_invalid_maildir_as_file>

    def test_invalid_maildir_as_file(self):
        result = self.invoke('deduplicate', './__init__.py')
        self.assertEqual(result.exit_code, 2)
>       self.assertIn(
            """Directory "./__init__.py" does not exist""", result.output)
E       AssertionError: 'Directory "./__init__.py" does not exist' not found in "Usage: cli deduplicate [OPTIONS] [MAILDIRS]...\nTry 'cli deduplicate --help' for help.\n\nError: Invalid value for '[MAILDIRS]...': Directory './__init__.py' does not exist.\n"

maildir_deduplicate/tests/test_cli.py:54: AssertionError
------------------------------------------------- Captured stdout call --------------------------------------------------
$ mdedupe deduplicate ./__init__.py
Usage: cli deduplicate [OPTIONS] [MAILDIRS]...
Try 'cli deduplicate --help' for help.

Error: Invalid value for '[MAILDIRS]...': Directory './__init__.py' does not exist.

<Result SystemExit(2)>
Traceback (most recent call last):
  File "/home/dave/usr/local/miniconda3/envs/maildir-dedupe/lib/python3.8/site-packages/click/testing.py", line 329, in invoke
    cli.main(args=args or (), prog_name=prog_name, **extra)
  File "/home/dave/usr/local/miniconda3/envs/maildir-dedupe/lib/python3.8/site-packages/click/core.py", line 800, in main
    sys.exit(e.exit_code)
SystemExit: 2
_____________________________________ TestDeduplicateCLI.test_nonexistent_directory _____________________________________

self = <maildir_deduplicate.tests.test_cli.TestDeduplicateCLI testMethod=test_nonexistent_directory>

    def test_nonexistent_directory(self):
        result = self.invoke('deduplicate', './dummy_maildir/')
        self.assertEqual(result.exit_code, 2)
>       self.assertIn(
            """Directory "./dummy_maildir/" does not exist""", result.output)
E       AssertionError: 'Directory "./dummy_maildir/" does not exist' not found in "Usage: cli deduplicate [OPTIONS] [MAILDIRS]...\nTry 'cli deduplicate --help' for help.\n\nError: Invalid value for '[MAILDIRS]...': Directory './dummy_maildir/' does not exist.\n"

maildir_deduplicate/tests/test_cli.py:48: AssertionError
------------------------------------------------- Captured stdout call --------------------------------------------------
$ mdedupe deduplicate ./dummy_maildir/
Usage: cli deduplicate [OPTIONS] [MAILDIRS]...
Try 'cli deduplicate --help' for help.

Error: Invalid value for '[MAILDIRS]...': Directory './dummy_maildir/' does not exist.

<Result SystemExit(2)>
Traceback (most recent call last):
  File "/home/dave/usr/local/miniconda3/envs/maildir-dedupe/lib/python3.8/site-packages/click/testing.py", line 329, in invoke
    cli.main(args=args or (), prog_name=prog_name, **extra)
  File "/home/dave/usr/local/miniconda3/envs/maildir-dedupe/lib/python3.8/site-packages/click/core.py", line 800, in main
    sys.exit(e.exit_code)
SystemExit: 2
=================================================== warnings summary ====================================================
maildir_deduplicate/tests/test_cli.py::TestHashCLI::test_stdin_hashing
  /home/dave/usr/src/maildir-deduplicate.git/maildir_deduplicate/mail.py:221: DeprecationWarning: Flags not at the start of the expression '([Rr]e: )*(\\[\\w[\\w_-' (truncated)
    matching = re.match(

-- Docs: https://docs.pytest.org/en/latest/warnings.html

----------- coverage: platform linux, python 3.8.2-final-0 -----------
Name                                 Stmts   Miss Branch BrPart     Cover
-------------------------------------------------------------------------
maildir_deduplicate/__init__.py         43      2      6      2    91.84%
maildir_deduplicate/cli.py              79     12     22      5    83.17%
maildir_deduplicate/deduplicate.py     253     59     98     19    72.65%
maildir_deduplicate/mail.py            126     39     56     13    65.93%
-------------------------------------------------------------------------
TOTAL                                  501    112    182     39    73.79%

================================================ short test summary info ================================================
FAILED maildir_deduplicate/tests/test_cli.py::TestDeduplicateCLI::test_invalid_maildir_as_file - AssertionError: 'Dire...
FAILED maildir_deduplicate/tests/test_cli.py::TestDeduplicateCLI::test_nonexistent_directory - AssertionError: 'Direct...
======================================== 2 failed, 18 passed, 1 warning in 0.49s ========================================

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.