How to get Resharper to allow underscores in method names but only in Tests?

This post demonstrates how to configure this: http://atombrenner.blogspot.com/2010/07/how-to-change-resharper-naming-style.html UPDATE: The Machine.Specifications testing framework extends ReSharper to allow for custom naming styles for the tests/specs. Very cool; wish other frameworks did likewise. http://lostechies.com/derekgreer/2010/02/11/resharper-naming-style-for-machine-specifications/

Unit Testing – What not to test

I’m not sure I can agree with any of the exceptions that you mention in your answer. Methods not involving logic Even if a method simply just delegates its implementation to an inner dependency, it is very relevant to verify that it happens. I presume that you write code for a reason, so you need … Read more

Run Tensorflow unit tests

The easiest way to run the TensorFlow unit tests is using Bazel, assuming you have downloaded the source from Git: # All tests (for C++ changes). $ bazel test //tensorflow/… # All Python tests (for Python front-end changes). $ bazel test //tensorflow/python/… # All tests (with GPU support). $ bazel test -c opt –config=cuda //tensorflow/… … Read more

How do I test an error on reading from a request body?

You may create and use an http.Request forged by you, which deliberately returns an error when reading its body. You don’t necessarily need a whole new request, a faulty body is enough (which is an io.ReadCloser). Simplest achieved by using the httptest.NewRequest() function where you can pass an io.Reader value which will be used (wrapped … Read more