SciTools/iris — pull request #884 by bblay (2013-12-12 15:23:36+00:00)
Title: assertString auto path

To test this, I added some *temporary* tests to ``Test_GribLevels```:

```
def test_assertString1(self):
self.assertString("12345")

def test_assertString2(self):
self.assertString("12345", basename="second_temporary_test")

def test_assertString3(self):
self.assertString("67890", basename="second_temporary_test")
```
As expected, this produced two new result files:
```
$ l lib/iris/tests/results/unit/fileformats/grib/load_rules/convert/GribLevels/
assertString1.txt second_temporary_test.txt

$ cat lib/iris/tests/results/unit/fileformats/grib/load_rules/convert/GribLevels/assertString1.txt
12345

$ cat lib/iris/tests/results/unit/fileformats/grib/load_rules/convert/GribLevels/second_temporary_test.txt
12345
```
And a failure:
```
FAIL: test_assertString3 (__main__.Test_GribLevels)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/iris/git/iris/lib/iris/tests/unit/fileformats/grib/load_rules/test_convert.py", line 38, in test_assertString3
self.assertString("67890", basename="second_temporary_test")
File "/home/iris/.local/lib/python2.7/site-packages/iris/tests/__init__.py", line 326, in assertString
type_comparison_name='Strings')
File "/home/iris/.local/lib/python2.7/site-packages/iris/tests/__init__.py", line 334, in _check_same
self._assert_str_same(reference, item, reference_filename, type_comparison_name)
File "/home/iris/.local/lib/python2.7/site-packages/iris/tests/__init__.py", line 159, in _assert_str_same
self.fail("%s do not match: %s\n%s" % (type_comparison_name, reference_filename, diff))
AssertionError: Strings do not match: /home/iris/.local/lib/python2.7/site-packages/iris/tests/results/unit/fileformats/grib/load_rules/convert/GribLevels/second_temporary_test.txt
--- Reference
+++ Test result
@@ -1 +1 @@
-12345+67890
```