From abe1cb124738d7b95b2c2969d6e1e9556aa0269d Mon Sep 17 00:00:00 2001 From: Ryan Fitzsimon Date: Wed, 31 Oct 2018 23:44:47 +1000 Subject: [PATCH] Use assertSequenceEqual to compare list and range Using assertEqual was causing the check to fail under Python 3, where range() returns an object rather than a list. --- vsg/tests/vhdlFile/test_vhdlFile_block.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsg/tests/vhdlFile/test_vhdlFile_block.py b/vsg/tests/vhdlFile/test_vhdlFile_block.py index 5575b957..3c698275 100644 --- a/vsg/tests/vhdlFile/test_vhdlFile_block.py +++ b/vsg/tests/vhdlFile/test_vhdlFile_block.py @@ -10,7 +10,7 @@ class testVhdlFileMethods(unittest.TestCase): def test_insideBlock_assignment(self): lExpected = range(10,29) lActual = [i for i, l in enumerate(oFileBlock.lines) if l.insideBlock] - self.assertEqual(lActual, lExpected) + self.assertSequenceEqual(lActual, lExpected) def test_isBlockBegin_assignment(self): lExpected = [18]