mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-mxnet] access2rohit commented on a change in pull request #16088: remove 'foo' and other print msg from test
Date Wed, 04 Sep 2019 05:59:49 GMT
access2rohit commented on a change in pull request #16088: remove 'foo' and other print msg
from test
URL: https://github.com/apache/incubator-mxnet/pull/16088#discussion_r320583399
 
 

 ##########
 File path: tests/python/unittest/test_profiler.py
 ##########
 @@ -126,23 +123,25 @@ def makeParams():
         template = ''.join('{%d}' % i for i in range(len(objects)))
         return template, objects
 
-    def doLog():
+    def get_log():
         template, objects = makeParams()
+        logs = []
         for _ in range(100000):
-            logging.info(template.format(*objects))
+            logs.append(template.format(*objects))
+        return logs
 
-    logging.basicConfig()
     enable_profiler('test_profile_frame.json')
     python_domain = profiler.Domain('PythonDomain::test_profile_frame')
     frame = profiler.Frame(python_domain, "test_profile_frame")
     frame.start()
     start = time.time()
     var = mx.nd.ones((1000, 500))
-    doLog()
+    log = get_log()
+    assert len(log) == 100000
 
 Review comment:
   `assert len(get_log()) == 100000` ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message