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

Enable the python setup.py test command. #62

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Kentzo
Copy link
Contributor

@Kentzo Kentzo commented Nov 21, 2017

No description provided.

@Martiusweb
Copy link
Owner

Hi,

Thanks for you pull-requests. I'll try to review them tomorrow or Friday.

@Kentzo
Copy link
Contributor Author

Kentzo commented Nov 21, 2017

No problem.

@Martiusweb
Copy link
Owner

Thanks for all your PRs.

Unfortunately this one will not work as it is, because test/__init__.py imports all modules of the package so they're discovered when running python -m unittest test. Emptying test/__init__.py will fix this, but there are some things to change: since python -m unittest test will not work anymore:

  • README and travis configuration needs to be updated to use python setup.py test,
  • test_case_await should probably not be discovered as being part of the suite, hence renamed or ignored in a way,
  • the configuration of test_suite should rather be set in setup.cfg.

@Kentzo
Copy link
Contributor Author

Kentzo commented Dec 5, 2017

@Martiusweb Hmm, it seems to work for me (Python 3.6.3) with only one test failing:

FAIL: test_patch_generator_with_multiple_scopes_on_same_dict (test.test_mock.Test_patch_dict_decorator_coroutine_or_generator_scope) [Outher: GLOBAL, inner: LIMITED]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/kentzo/Documents/Work/GreatFruit/asynctest/test/test_mock.py", line 782, in test_patch_generator_with_multiple_scopes_on_same_dict
    (self.is_patched(), self.second_is_patched()))
AssertionError: Tuples differ: (True, False) != (True, True)

First differing element 1:
False
True

- (True, False)
+ (True, True)

@Kentzo
Copy link
Contributor Author

Kentzo commented Aug 29, 2018

@Martiusweb Updated the PR to allow running tests via -m unittest, setup.py test and pytest (setup.py pytest too if you have pytest-runner installed).

Integrated coveralls, but you have to activate it for the repo. Here is an example for my fork: https://coveralls.io/builds/18737375

@Kentzo Kentzo force-pushed the test_suite branch 3 times, most recently from 3ff9f21 to f29ae2e Compare August 29, 2018 20:59
Kentzo added 2 commits August 29, 2018 14:02
Tests can be run via:

- python setup.py test
- python -m unittest test
- pytest
- pytest test
@Kentzo Kentzo force-pushed the test_suite branch 2 times, most recently from 37a00b4 to 968494c Compare August 30, 2018 03:01
@Kentzo
Copy link
Contributor Author

Kentzo commented Aug 31, 2018

@Martiusweb For coveralls to work on Appveyor, the COVERALLS_REPO_TOKEN has to be set manually after you active the project there.

@Kentzo
Copy link
Contributor Author

Kentzo commented Sep 12, 2018

@Martiusweb Anything missing?

@Martiusweb Martiusweb force-pushed the master branch 3 times, most recently from c2e9ce1 to 967481c Compare April 3, 2019 15:31
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