https://pantsbuild.org/ logo
#general
Title
# general
h

hundreds-father-404

11/18/2019, 6:29 PM
Python question. Anyone know why this is still printing twice?
Copy code
class LoggingTest(TestBase):

  logging_initialized = False

  def experiment(self):
    if not self.logging_initialized:
      print("LOGGING NOT INITIALIZED")
      self.logging_initialized = True

  def test_utf8_logging(self):
    self.experiment()

  def test_file_logging(self):
    self.experiment()