imports - use of globals. baaaad
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 31 May 2020 18:46:44 +0000 (19:46 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 31 May 2020 18:46:44 +0000 (19:46 +0100)
src/soc/fu/compunits/test/test_alu_compunit.py

index 6041cd3ec2ab185bfd7ac1eb83b99e020786b3d8..f81aa736dd66c4bf2f720877f8cd04b1402cb46b 100644 (file)
@@ -1,7 +1,10 @@
 import unittest
 from soc.decoder.power_enums import (XER_bits,)
 
-from soc.fu.alu.test.test_pipe_caller import TestCase, ALUTestCase, test_data
+# XXX bad practice: use of global variables
+from soc.fu.alu.test.test_pipe_caller import ALUTestCase # creates the tests
+from soc.fu.alu.test.test_pipe_caller import test_data # imports the data
+
 from soc.fu.compunits.compunits import ALUFunctionUnit
 from soc.fu.compunits.test.test_compunit import TestRunner