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

assertions should be in the order expected, actual #1

Open
do3cc opened this issue Feb 24, 2015 · 7 comments
Open

assertions should be in the order expected, actual #1

do3cc opened this issue Feb 24, 2015 · 7 comments

Comments

@do3cc
Copy link

do3cc commented Feb 24, 2015

self.assertEqual('My Talk', talk.title)
I have a book from Kent Beck telling me why, but not in the office. I only found this reference now:
https://github.com/junit-team/junit/wiki/Assertions
Maybe @regebro has memorized the book enough to cite it ;-)

@tisto
Copy link
Owner

tisto commented Feb 24, 2015

Test-Driven Development by Example?

@tisto
Copy link
Owner

tisto commented Feb 24, 2015

You are correct, in TTD by Example the first argument is always the expected one. Couldn't find the explanation right away though...

@do3cc
Copy link
Author

do3cc commented Feb 24, 2015

maybe for the same reason that you should put should put static elements in comparisons on the left hand side of comparisons. But yeah, should bring this book into the office.

@tisto
Copy link
Owner

tisto commented Feb 24, 2015

Nah. Keeping that book under the pillow is also always a good idea. ;)

@do3cc
Copy link
Author

do3cc commented Feb 24, 2015

I am btw. copying your code nearly verbatim into the mastering plone training

@tisto
Copy link
Owner

tisto commented Feb 24, 2015

Not sure if this is the best approach. I plan to continue to work on this and then we will have two diverging sources.

@tisto
Copy link
Owner

tisto commented Feb 24, 2015

Maybe I can move this repo into plone/collective and we can work on this together. I would actually like to keep my approach of testing everything that goes into sphinx.

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

No branches or pull requests

2 participants