Skip to content

Commit

Permalink
add pragma: no cover to exception/else statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mclim9 committed Aug 13, 2020
1 parent 161e3ba commit 346e0bc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions rssd/NRQ/Common.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def Set_DisplayUpdate(self,state):
elif state in (0,'0','OFF'):
self.write('SYST:DISP:UPD OFF') #Display Update State


#####################################################################
### NRQ Common Settings
#####################################################################
Expand Down Expand Up @@ -96,7 +95,7 @@ def Get_IQtoIQW(self):
if self.Get_IQ_RecLength() < 125000000:
digits = data[1]
print(digits)
else:
else: # pragma: no cover
digits = "10"

# Don't need this but including for completeness
Expand Down
14 changes: 7 additions & 7 deletions rssd/OTA/Common.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@ def query(self,cmd): #pragma: no cover
# rdStr = self.K2.recv(2048).strip().decode()
# return rdStr

#####################################################################
###########################################################################
### OTA Get Functions
#####################################################################
###########################################################################

#####################################################################
###########################################################################
### OTA Init Functions
#####################################################################
def Init_Measurement(self):
###########################################################################
def Init_Measurement(self): #pragma: no cover
#Configure instrument measurment
pass

#####################################################################
###########################################################################
### OTA Set Functions
#####################################################################
###########################################################################

###############################################################################
### Debug Main. Won't run when imported
Expand Down
2 changes: 1 addition & 1 deletion rssd/VSA/ADemod_K7.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def Set_Adem_LPassStat(self,on):
self.write('SENSe:FILT:LPASS:STAT ON')
elif (on == 'OFF') or (on == 0):
self.write('SENSe:FILT:LPASS:STAT OFF')
else:
else: #pragma: no cover
print('State not supported, please set ON or OFF')

def Set_Adem_LPassAbsolute(self,sBW):
Expand Down
2 changes: 1 addition & 1 deletion rssd/VSG/CustomDigMod.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def Set_CDM_State(self,State):
self.write(':SOUR1:BB:DM:STAT ON')
elif (State == 0) or (State == 'OFF'):
self.write(':SOUR1:BB:DM:STAT OFF')
else:
else: # pragma: no cover
print('State not supported, please set ON or OFF')

#####################################################################
Expand Down

0 comments on commit 346e0bc

Please sign in to comment.