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

Speedup test suite by using weak hash algo #348

Merged
merged 1 commit into from Aug 9, 2016

Conversation

vhf
Copy link
Contributor

@vhf vhf commented Aug 9, 2016

Default password hasher is slow by design, which in turn usually slows down test user creation quite a bit. Relevant doc: https://docs.djangoproject.com/en/1.9/topics/testing/overview/#password-hashing

On my laptop, repeated time make test goes from >110s to <60s.

Default password hasher is slow by design and the test suite creates many
users. Relevant doc: https://docs.djangoproject.com/en/1.9/topics/testing/overview/#password-hashing

On my laptop, repeated `time make test` goes from ~110s to ~58s.
@@ -130,4 +130,9 @@
STATIC_URL = '/static/'
STATIC_ROOT = 'staticfiles'


TESTING = sys.argv[1:2] == ['test']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a slice here and not just look at sys.argv[1]?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think because he doesn't check the length, a slice will always return an empty array

@vhf
Copy link
Contributor Author

vhf commented Aug 9, 2016

Unfortunately CI fails, seemingly because it cannot push coverage report.

@joshblum
Copy link
Collaborator

joshblum commented Aug 9, 2016

@vhf yeah it's a bug with coveralls :/, just submitted TheKevJames/coveralls-python#115 to ask about it. We can review and manually test for the time being, thanks for the contributions!!

@joshblum joshblum merged commit 20c94e5 into b12io:master Aug 9, 2016
@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.458% when pulling 2b4d153 on vhf:speedup-tests into 2e84c42 on b12io:master.

@vhf vhf mentioned this pull request Aug 15, 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.

None yet

4 participants