Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

unittest run specific test

python -m unittest mypkg.tests.test_module.TestClass.test_method
Comment

unittest run one test

# from command line
# module_name and method_name are self - explanatory
# MyTestClass is the class derived from unittest.TestCase (for example)
python -m unittest module_name.MyTestClass.method_name 
Comment

unittest only run test if other tests passes

class Test(unittest.TestCase):
	def test_if_other_test_passes(self):
      # Add first test here
      self.assertTrue(foo())
      # This test will only run if the first test passes
      self.assertEqual(bar(), 2)
Comment

PREVIOUS NEXT
Code Example
Shell :: how to check raspbian os version 
Shell :: get diff stash 
Shell :: git clone password authentication failed 
Shell :: Git - show all files that have changes to commit 
Shell :: how to show a tag in git 
Shell :: github new repository 
Shell :: Bash echo to standard output from function 
Shell :: how to move folders in linux terminal 
Shell :: Generate Key Hashes For Facebook login Android app 
Shell :: how to install pytesseract in rpi 
Shell :: nginx on ubuntu 
Shell :: github quick reference 
Shell :: run node api on rapberry pi 
Shell :: pm2 how to make app start on boot 
Shell :: bash: udevadm: command not found 
Shell :: remove image docker 
Shell :: show pghba 
Shell :: ubuntu add entry to /etc/apt/sources.list 
Shell :: ERROR: Repository not found. fatal: Konnte nicht vom Remote-Repository lesen. Bitte stellen Sie sicher, dass die korrekten Zugriffsberechtigungen bestehen und das Repository existiert. 
Shell :: Unix and Linux System Commands 
Shell :: how to convert a function from powershell in c# 
Shell :: conda install sentencepiece 
Shell :: raid 0 
Shell :: raspberry pi ssh headless 
Shell :: install svgo linux 
Shell :: count unique ip addresses linux accsses log 
Shell :: TestStand null char 
Shell :: xfce apt install xfce4-xkb-plugin 
Shell :: cp all files except .git 
Shell :: Create htpasswd file for nginx (without apache) 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =