Skip to content

Conversation

livenson
Copy link
Contributor

@livenson livenson commented Jun 7, 2016

Replaced set comprehension syntax with py2.6+ compatible syntax, cleanup of pylint issues.

@review-ninja
Copy link

ReviewNinja

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 5c8e30b on livenson:develop into * on pycontribs:develop*.

@livenson
Copy link
Contributor Author

livenson commented Jun 7, 2016

Ok, the tests are working locally, but CI seems to be running against a remote server, which seems to be causing issues with pseudo-mockup objects in test setup. The easiest would be to use the same env on travis as locally, but I didn't quite chew through the variables/setup idea. @ssbarnea , could you please help out a bit?

@ssbarnea
Copy link
Member

ssbarnea commented Jun 7, 2016

The only thing that is different between running locally and running on Travis is that it will try to use different project names, which are generated based on current username. This is needed in order to prevent affecting the same projects while running tests in parallel.

Also Travis is running tests in parallel with different Python versions, and sometimes this is causing problems. It's tricky to make the tests pass on these conditions but not impossible. I will have a look.

@ssbarnea ssbarnea merged commit 1dda8b9 into pycontribs:develop Jun 7, 2016
@lechat
Copy link
Contributor

lechat commented Jun 7, 2016

I think that it is worth splitting tests into multiple files. Of course it is possible to call specific tests, if needed, but if each test will be in separate file, it will be easier to add new tests.

Basically the same way we've done it in jenkinsapi.

@livenson
Copy link
Contributor Author

livenson commented Jun 7, 2016

I guess if you do that in a PR, it will be accepted 😉

@lechat
Copy link
Contributor

lechat commented Jun 7, 2016

I sure am can do that, but decided to ask if there are any objections. ;) There must be a reason why all tests are in the same file and I find it impolite to make drastic changes w/o asking.

@ssbarnea
Copy link
Member

ssbarnea commented Jun 7, 2016

That's not so easy, I don't want to see 100+ files, one for each test but splitting them in several files one for each class should be something good.

Keep in mind that execution order matters for the tests that are inside the same class, or at least it still matters at this moment.

Running test-classes in parallel should work well but not each test method. This is mostly caused by the really fat tear-up and tear-down code, which is impossible to avoid.

In fact we have integration tests implementing using py.test, not real unittests.

@livenson
Copy link
Contributor Author

livenson commented Jun 7, 2016

I suggest using mock library for that. Currently that "fat tear-up" is extremely hard to understand/debug.

ssbarnea added a commit that referenced this pull request Nov 21, 2016
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.

5 participants