MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

  • Python
  • pytest

pytest

   1 mkdir test-pytest
   2 cd test-pytest/
   3 python3 -m venv testVenv
   4 source testVenv/bin/activate
   5 nano unitTest.py 
   6 nano requirements.txt
   7 pip install -r requirements.txt 
   8 pytest unitTest.py 

requirements.txt

pytest

unitTest.py

   1 import unittest
   2 
   3 class SimpleTestCase(unittest.TestCase):
   4     def setUp(self):
   5         self.res=4
   6 
   7     def tearDown(self):
   8         self.res=0
   9 
  10     def testAdd1(self):
  11         res=2+2
  12         self.assertEqual(self.res,res,'')       
  13 
  14     def testAdd2(self):
  15         res=2+3
  16         self.assertEqual(self.res,res,'')       
  17 
  18     def testAdd3(self):
  19         res=2+3
  20         self.assertNotEqual(self.res,res,'')
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01