diff options
author | mormj <mormjb@gmail.com> | 2020-10-30 10:59:50 -0400 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2020-10-30 17:52:53 +0100 |
commit | 7a0948ba85758fba1cc3858ef99bfa600dcc7416 (patch) | |
tree | 610d7f9d773a193562def6df2d4b50f1bb3b3f86 /gr-digital/python/digital/qa_crc32.py | |
parent | 12192ee7d58de95ddca35a3e93bfc172bdb5c820 (diff) |
qa: run autopep8 formatting on qa python files
find ./ -iname qa*.py | xargs autopep8 --in-place -a -a
mostly formats whitespace and gets rid of trailing semicolons
Diffstat (limited to 'gr-digital/python/digital/qa_crc32.py')
-rw-r--r-- | gr-digital/python/digital/qa_crc32.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gr-digital/python/digital/qa_crc32.py b/gr-digital/python/digital/qa_crc32.py index f5340082be..8207a34e73 100644 --- a/gr-digital/python/digital/qa_crc32.py +++ b/gr-digital/python/digital/qa_crc32.py @@ -1,18 +1,19 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # SPDX-License-Identifier: GPL-3.0-or-later # -# +# import cmath from gnuradio import gr, gr_unittest, digital + class test_crc32(gr_unittest.TestCase): def setUp(self): @@ -22,28 +23,29 @@ class test_crc32(gr_unittest.TestCase): self.tb = None def test01(self): - data = 100*"0" + data = 100 * "0" expected_result = 2943744955 result = digital.crc32(data) - #print hex(result) - + # print hex(result) + self.assertEqual(expected_result, result) def test02(self): - data = 100*"1" + data = 100 * "1" expected_result = 2326594156 result = digital.crc32(data) - #print hex(result) - + # print hex(result) + self.assertEqual(expected_result, result) def test03(self): - data = 10*"0123456789" + data = 10 * "0123456789" expected_result = 3774345973 result = digital.crc32(data) - #print hex(result) + # print hex(result) self.assertEqual(expected_result, result) + if __name__ == '__main__': gr_unittest.run(test_crc32) |