Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add .flake8 to manifest file #13

Merged
merged 1 commit into from
Aug 5, 2018
Merged

Conversation

kennyballou
Copy link
Contributor

Without this file, a few tests fail when running the test suite against
the source archive of the project. The specific failures stem from the
missing flake8 configurations adjusting the rules for the tests. The
errors in the test suite are resolved when this file is added. This can
be reproduced by running the following commands:

(/tmp)% curl -fsL \
        https://files.pythonhosted.org/packages/03/22/0fa6fd83033faf8010e9cd40c6fcd50f5b729ec49f0b7eca65b3b0551ef5/flake8-pyi-18.3.1.tar.gz \
        -o flake8-pyi-18.3.1.tar.gz
(/tmp)% tar -zxf flake8-pyi-18.3.1.tar.gz
(flake8-pyi-18.3.1)% python setup.py test
...
test_comparisons (tests.test_pyi.PyiTestCase) ... ok
test_defaults (tests.test_pyi.PyiTestCase) ... FAIL
test_empty_init (tests.test_pyi.PyiTestCase) ... ok
test_function_def (tests.test_pyi.PyiTestCase) ... FAIL
test_patched_flake8_clean_del (tests.test_pyi.PyiTestCase) ... ok
test_patched_flake8_clean_forward_refs (tests.test_pyi.PyiTestCase) ... ok
test_sys_platform (tests.test_pyi.PyiTestCase) ... ok
test_sys_versioninfo (tests.test_pyi.PyiTestCase) ... ok
test_typevar (tests.test_pyi.PyiTestCase) ... ok
test_vanilla_flake8_not_clean_del (tests.test_pyi.PyiTestCase) ... ok
test_vanilla_flake8_not_clean_forward_refs (tests.test_pyi.PyiTestCase) ... ok

======================================================================
FAIL: test_defaults (tests.test_pyi.PyiTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/flake8-pyi-18.3.1/tests/test_pyi.py", line 141, in test_defaults
    self.checkFileOutput('defaults.pyi', stdout_lines=stdout_lines)
  File "/tmp/flake8-pyi-18.3.1/tests/test_pyi.py", line 46, in checkFileOutput
    self.assertMultiLineEqual(expected, actual)
AssertionError: 'defaults.pyi:3:17: Y011 Default values for typed argument[160 chars]..."' != 'defaults.pyi:3:1: E302 expected 2 blank lines, found 0\nd[555 chars]nd 0'
+ defaults.pyi:3:1: E302 expected 2 blank lines, found 0
  defaults.pyi:3:17: Y011 Default values for typed arguments must be "..."
+ defaults.pyi:5:1: E302 expected 2 blank lines, found 0
+ defaults.pyi:7:1: E302 expected 2 blank lines, found 0
  defaults.pyi:7:20: Y011 Default values for typed arguments must be "..."
+ defaults.pyi:9:1: E302 expected 2 blank lines, found 0
+ defaults.pyi:11:1: E302 expected 2 blank lines, found 0
+ defaults.pyi:13:1: E302 expected 2 blank lines, found 0
- defaults.pyi:13:20: Y011 Default values for typed arguments must be "..."+ defaults.pyi:13:20: Y011 Default values for typed arguments must be "..."
?                                                                          +
+ defaults.pyi:15:1: E302 expected 2 blank lines, found 0

======================================================================
FAIL: test_function_def (tests.test_pyi.PyiTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/flake8-pyi-18.3.1/tests/test_pyi.py", line 124, in test_function_def
    self.checkFileOutput('emptyfunctions.pyi', stdout_lines=stdout_lines)
  File "/tmp/flake8-pyi-18.3.1/tests/test_pyi.py", line 46, in checkFileOutput
    self.assertMultiLineEqual(expected, actual)
AssertionError: 'emptyfunctions.pyi:5:5: Y009 Empty body should contain "..."[146 chars]..."' != 'emptyfunctions.pyi:4:1: E302 expected 2 blank lines, found 1[522 chars]..."'
+ emptyfunctions.pyi:4:1: E302 expected 2 blank lines, found 1
  emptyfunctions.pyi:5:5: Y009 Empty body should contain "...", not "pass"
+ emptyfunctions.pyi:7:1: E302 expected 2 blank lines, found 1
+ emptyfunctions.pyi:10:1: E302 expected 2 blank lines, found 1
+ emptyfunctions.pyi:14:1: E302 expected 2 blank lines, found 1
+ emptyfunctions.pyi:18:1: E302 expected 2 blank lines, found 1
  emptyfunctions.pyi:19:5: Y010 Function body must contain only "..."
+ emptyfunctions.pyi:21:1: E302 expected 2 blank lines, found 1
  emptyfunctions.pyi:23:5: Y010 Function body must contain only "..."

----------------------------------------------------------------------
...

Add the .flake8 configuration file to the MANIFEST.in file so the
flake8 configuration used for testing is also distributed in the source
archive.

Without this file, a few tests fail when running the test suite against
the source archive of the project.  The specific failures stem from the
missing `flake8` configurations adjusting the rules for the tests.  The
errors in the test suite are resolved when this file is added.  This can
be reproduced by running the following commands:

```
(/tmp)% curl -fsL \
        https://files.pythonhosted.org/packages/03/22/0fa6fd83033faf8010e9cd40c6fcd50f5b729ec49f0b7eca65b3b0551ef5/flake8-pyi-18.3.1.tar.gz \
        -o flake8-pyi-18.3.1.tar.gz
(/tmp)% tar -zxf flake8-pyi-18.3.1.tar.gz
(flake8-pyi-18.3.1)% python setup.py test
...
test_comparisons (tests.test_pyi.PyiTestCase) ... ok
test_defaults (tests.test_pyi.PyiTestCase) ... FAIL
test_empty_init (tests.test_pyi.PyiTestCase) ... ok
test_function_def (tests.test_pyi.PyiTestCase) ... FAIL
test_patched_flake8_clean_del (tests.test_pyi.PyiTestCase) ... ok
test_patched_flake8_clean_forward_refs (tests.test_pyi.PyiTestCase) ... ok
test_sys_platform (tests.test_pyi.PyiTestCase) ... ok
test_sys_versioninfo (tests.test_pyi.PyiTestCase) ... ok
test_typevar (tests.test_pyi.PyiTestCase) ... ok
test_vanilla_flake8_not_clean_del (tests.test_pyi.PyiTestCase) ... ok
test_vanilla_flake8_not_clean_forward_refs (tests.test_pyi.PyiTestCase) ... ok

======================================================================
FAIL: test_defaults (tests.test_pyi.PyiTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/flake8-pyi-18.3.1/tests/test_pyi.py", line 141, in test_defaults
    self.checkFileOutput('defaults.pyi', stdout_lines=stdout_lines)
  File "/tmp/flake8-pyi-18.3.1/tests/test_pyi.py", line 46, in checkFileOutput
    self.assertMultiLineEqual(expected, actual)
AssertionError: 'defaults.pyi:3:17: Y011 Default values for typed argument[160 chars]..."' != 'defaults.pyi:3:1: E302 expected 2 blank lines, found 0\nd[555 chars]nd 0'
+ defaults.pyi:3:1: E302 expected 2 blank lines, found 0
  defaults.pyi:3:17: Y011 Default values for typed arguments must be "..."
+ defaults.pyi:5:1: E302 expected 2 blank lines, found 0
+ defaults.pyi:7:1: E302 expected 2 blank lines, found 0
  defaults.pyi:7:20: Y011 Default values for typed arguments must be "..."
+ defaults.pyi:9:1: E302 expected 2 blank lines, found 0
+ defaults.pyi:11:1: E302 expected 2 blank lines, found 0
+ defaults.pyi:13:1: E302 expected 2 blank lines, found 0
- defaults.pyi:13:20: Y011 Default values for typed arguments must be "..."+ defaults.pyi:13:20: Y011 Default values for typed arguments must be "..."
?                                                                          +
+ defaults.pyi:15:1: E302 expected 2 blank lines, found 0

======================================================================
FAIL: test_function_def (tests.test_pyi.PyiTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/flake8-pyi-18.3.1/tests/test_pyi.py", line 124, in test_function_def
    self.checkFileOutput('emptyfunctions.pyi', stdout_lines=stdout_lines)
  File "/tmp/flake8-pyi-18.3.1/tests/test_pyi.py", line 46, in checkFileOutput
    self.assertMultiLineEqual(expected, actual)
AssertionError: 'emptyfunctions.pyi:5:5: Y009 Empty body should contain "..."[146 chars]..."' != 'emptyfunctions.pyi:4:1: E302 expected 2 blank lines, found 1[522 chars]..."'
+ emptyfunctions.pyi:4:1: E302 expected 2 blank lines, found 1
  emptyfunctions.pyi:5:5: Y009 Empty body should contain "...", not "pass"
+ emptyfunctions.pyi:7:1: E302 expected 2 blank lines, found 1
+ emptyfunctions.pyi:10:1: E302 expected 2 blank lines, found 1
+ emptyfunctions.pyi:14:1: E302 expected 2 blank lines, found 1
+ emptyfunctions.pyi:18:1: E302 expected 2 blank lines, found 1
  emptyfunctions.pyi:19:5: Y010 Function body must contain only "..."
+ emptyfunctions.pyi:21:1: E302 expected 2 blank lines, found 1
  emptyfunctions.pyi:23:5: Y010 Function body must contain only "..."

----------------------------------------------------------------------
...
```

Add the `.flake8` configuration file to the `MANIFEST.in` file so the
flake8 configuration used for testing is also distributed in the source
archive.

Signed-off-by: Kenny Ballou <kballou@devnulllabs.io>
@ambv ambv merged commit 055e6e4 into PyCQA:master Aug 5, 2018
@JelleZijlstra JelleZijlstra mentioned this pull request Dec 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants