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 quick test #4

Merged
merged 6 commits into from
Mar 6, 2020
Merged

add quick test #4

merged 6 commits into from
Mar 6, 2020

Conversation

wj-Mcat
Copy link
Collaborator

@wj-Mcat wj-Mcat commented Feb 29, 2020

Make new pull request.

@huan huan mentioned this pull request Feb 29, 2020
@huan
Copy link
Member

huan commented Feb 29, 2020

Thanks for updating!

I have fixed the CI blocking bug, now we can see the linting errors from the Travis CI, or reproduce it in local Linux box:

$ make lint
pylint src/wechaty/config_test.py src/wechaty/__init__.py src/wechaty/config.py src/wechaty/accessory.py src/wechaty/images.py tests/smoke_testing_test.py
************* Module wechaty.accessory
src/wechaty/accessory.py:1:0: C0114: Missing module docstring (missing-module-docstring)
src/wechaty/accessory.py:5:0: C0115: Missing class docstring (missing-class-docstring)
src/wechaty/accessory.py:5:0: R0205: Class 'Puppet' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
src/wechaty/accessory.py:7:27: W0622: Redefining built-in 'id' (redefined-builtin)
src/wechaty/accessory.py:14:8: W0107: Unnecessary pass statement (unnecessary-pass)
src/wechaty/accessory.py:5:0: R0903: Too few public methods (1/2) (too-few-public-methods)
src/wechaty/accessory.py:16:0: C0112: Empty class docstring (empty-docstring)
src/wechaty/accessory.py:16:0: R0205: Class 'Accessory' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
src/wechaty/accessory.py:26:4: C0202: Class method __str__ should have 'cls' as first argument (bad-classmethod-argument)
src/wechaty/accessory.py:16:0: R0903: Too few public methods (1/2) (too-few-public-methods)
src/wechaty/accessory.py:2:0: W0611: Unused Any imported from typing (unused-import)
************* Module wechaty.images
src/wechaty/images.py:11:0: R1707: Disallow trailing comma tuple (trailing-comma-tuple)
src/wechaty/images.py:12:0: R1707: Disallow trailing comma tuple (trailing-comma-tuple)
src/wechaty/images.py:67:0: C0305: Trailing newlines (trailing-newlines)
src/wechaty/images.py:1:0: C0114: Missing module docstring (missing-module-docstring)
src/wechaty/images.py:15:0: W0223: Method '__str__' is abstract in class 'Accessory' but is not overridden (abstract-method)
src/wechaty/images.py:19:22: W0622: Redefining built-in 'id' (redefined-builtin)
src/wechaty/images.py:22:8: W1202: Use % formatting in logging functions and pass the % parameters as arguments (logging-format-interpolation)
src/wechaty/images.py:22:35: E1101: Instance of 'Image' has no '__name__' member (no-member)
src/wechaty/images.py:29:25: W0622: Redefining built-in 'id' (redefined-builtin)
src/wechaty/images.py:29:4: W0211: Static method with 'cls' as first argument (bad-staticmethod-argument)
src/wechaty/images.py:36:8: W1202: Use % formatting in logging functions and pass the % parameters as arguments (logging-format-interpolation)
src/wechaty/images.py:44:8: W1202: Use % formatting in logging functions and pass the % parameters as arguments (logging-format-interpolation)
src/wechaty/images.py:53:8: W1202: Use % formatting in logging functions and pass the % parameters as arguments (logging-format-interpolation)
src/wechaty/images.py:62:8: W1202: Use % formatting in logging functions and pass the % parameters as arguments (logging-format-interpolation)
src/wechaty/images.py:3:0: W0611: Unused Optional imported from typing (unused-import)
src/wechaty/images.py:3:0: W0611: Unused Type imported from typing (unused-import)
src/wechaty/images.py:3:0: W0611: Unused TypeVar imported from typing (unused-import)
src/wechaty/images.py:4:0: W0611: Unused import asyncio (unused-import)
src/wechaty/images.py:3:0: C0411: standard import "from typing import Optional, Type, TypeVar" should be placed before "from src.wechaty.accessory import Accessory" (wrong-import-order)
src/wechaty/images.py:4:0: C0411: standard import "import asyncio" should be placed before "from src.wechaty.accessory import Accessory" (wrong-import-order)
src/wechaty/images.py:5:0: C0411: standard import "from enum import IntEnum" should be placed before "from src.wechaty.accessory import Accessory" (wrong-import-order)

-------------------------------------------------------------------
Your code has been rated at 4.38/10 (previous run: 10.00/10, -5.62)

make: *** [Makefile:18: pylint] Error 30

Please fix them so that the CI can turn green, then we will be able to merge this very first Pull Request.

Thanks for your effort, cheers!

@huan
Copy link
Member

huan commented Mar 2, 2020

ping @wj-Mcat

@wj-Mcat
Copy link
Collaborator Author

wj-Mcat commented Mar 4, 2020

Below is the error of complete config class .

==================================== ERRORS ===========================
_________________ ERROR collecting src/wechaty/config_test.py __________________
ImportError while importing test module '/home/travis/build/wechaty/python-wechaty/src/wechaty/config_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
src/wechaty/config_test.py:11: in
from .config import (
src/wechaty/config.py:25: in
from wechaty_puppet.file_box import FileBox
E ModuleNotFoundError: No module named 'wechaty_puppet'
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.10 seconds ============================
Makefile:39: recipe for target 'pytest' failed
make: *** [pytest] Error 2
The command "make test" exited with 2.


When I run "make lint" and "make test" at my local machine, it does not occur any error.

@huan
Copy link
Member

huan commented Mar 4, 2020

Great work.

Please keep updating, and I'll look into it to see if I can fix it tonight.

@huan huan merged commit ab2a8ec into wechaty:master Mar 6, 2020
@huan
Copy link
Member

huan commented Mar 6, 2020

I have merged this PR to the master, let's continue working on the python wechaty based on your current code!

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.

2 participants