Skip to content
Snippets Groups Projects
Commit 8388250d authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

AtlasTest: enable flake8 and fix code

parent 216f4040
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!37609AtlasTest+Tools: enable flake8
......@@ -106,5 +106,5 @@ atlas_add_test( test_handleTest
SCRIPT test/test_handleTest.sh )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/StoreGateTestCommon.txt share/*.py )
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from __future__ import print_function
from AthenaCommon.Constants import VERBOSE,INFO
from AthenaCommon.KeyStore import CfgItemList, CfgKeyStore
from AthenaCommon.KeyStore import CfgKeyStore
from AthenaCommon.Logging import logging
......
......@@ -4,7 +4,7 @@
atlas_subdir( PyAthenaTests )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py )
atlas_install_runtime( test/*.ref )
atlas_install_scripts( test/*.py )
......@@ -67,7 +67,7 @@ class PyRecord( PyAthena.Alg ):
allGood = True
particles = PyAthena.AthExParticles()
## fill-in particles:
for i in xrange(10):
for i in range(10):
particles.push_back( PyAthena.AthExParticle(i,i,i,i) )
if _record(particles, self.particles) != StatusCode.Success:
......@@ -564,7 +564,7 @@ class ClusterExAlg(PyAthena.Alg):
_clusE = self.hsvc['/py/clusE'].Fill
_clusEta = self.hsvc['/py/clusEta'].Fill
from ROOT import CaloClusterMoment
from ROOT import CaloClusterMoment # noqa: F401
from ROOT import Double as RDouble
for i,cluster in enumerate(clusters):
......@@ -596,7 +596,6 @@ class ClusterExAlg(PyAthena.Alg):
def finalize(self):
_info = self.msg.info
_info('==> finalize')
import AthenaCommon.Constants
clusE = self.hsvc['/py/clusE']
clusEta = self.hsvc['/py/clusEta']
......@@ -666,7 +665,7 @@ class AresClusterExAlg(PyAthena.Alg):
_clusE = self.hsvc['/py/clusE'].Fill
_clusEta = self.hsvc['/py/clusEta'].Fill
from ROOT import CaloClusterMoment
from ROOT import CaloClusterMoment # noqa: F401
from ROOT import Double as RDouble
for i,cluster in enumerate(clusters):
......@@ -698,7 +697,6 @@ class AresClusterExAlg(PyAthena.Alg):
def finalize(self):
_info = self.msg.info
_info('==> finalize')
import AthenaCommon.Constants
clusE = self.hsvc['/py/clusE']
clusEta = self.hsvc['/py/clusEta']
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from math import log10
from PyAthenaTests.Lib import _patch
......@@ -22,7 +22,7 @@ def new_execute(self):
_clusE = self.hsvc['/py/clusE'].Fill
_clusEta = self.hsvc['/py/clusEta'].Fill
from ROOT import CaloClusterMoment
from ROOT import CaloClusterMoment # noqa: F401
from ROOT import Double as RDouble
for i,cluster in enumerate(clusters):
......
......@@ -18,7 +18,7 @@ else()
endif()
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py )
atlas_install_scripts( share/post.sh share/nopost.sh )
......
......@@ -105,7 +105,7 @@ class Bench(object):
for i in range(self.nTimes):
iStart = getResources()
out = fct( *args, **kwargs )
fct( *args, **kwargs )
self.data.append( getResources() - iStart )
pass
......@@ -143,7 +143,6 @@ class Bench(object):
## ---- Athena specific part ----
##
import os
from configparser import ConfigParser
class ChronoStatsOutputParser( ConfigParser ):
"""Subclass and specialize ConfigParser to make it case-sensitive
......@@ -326,7 +325,6 @@ def doPostCheck( validationName, refFileName, chkFileName, chkFilter ):
###-----------------------------------------------------
from AthenaCommon import ChapPy
from tempfile import NamedTemporaryFile
class AthBench(object):
def __init__( self,
......@@ -356,7 +354,7 @@ class AthBench(object):
for i in range(self.nTimes):
self.athena.logFile = open( "%s.%s" % (self.logFileName,i), "w" )
iStart = getResources()
out = self.athena.run()
self.athena.run()
self.data.append( getResources() - iStart )
self.chronoStats.append( ChronoStatReport(self.ioStatsFileName) )
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment