From 29315213a8503de018a76badc71da3737d2b54c7 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 17 Nov 2020 18:01:49 +1100 Subject: [PATCH] example: Fix spiffsgen example test Regression in 66fb5a29bbdc2482d67c52e6f66b303378c9b789 - whitespace cleanup added trailing newline (\n) to the end of the file, which is printed as \r\n by IDF printf, so the 'expect' fails to see it. --- examples/storage/spiffsgen/example_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/storage/spiffsgen/example_test.py b/examples/storage/spiffsgen/example_test.py index 724fef9c8e..32b6cc7e92 100644 --- a/examples/storage/spiffsgen/example_test.py +++ b/examples/storage/spiffsgen/example_test.py @@ -15,7 +15,7 @@ def test_examples_spiffsgen(env, extra_data): # Expect hello.txt is read successfully with open(os.path.join(base_dir, 'hello.txt'), 'r') as hello_txt: - dut.expect('Read from hello.txt: ' + hello_txt.read()) + dut.expect('Read from hello.txt: ' + hello_txt.read().rstrip()) # Expect alice.txt MD5 hash is computed accurately with open(os.path.join(base_dir, 'sub', 'alice.txt'), 'rb') as alice_txt: