Line | |
---|
1 | import unittest
|
---|
2 | import random
|
---|
3 | from unitpy.GeneralTests import GeneralTests
|
---|
4 | from typing import List
|
---|
5 | from pickle import TRUE
|
---|
6 | from unitpy.After import After, getAfter
|
---|
7 | from unitpy.Ignore import getIgnored, Ignore
|
---|
8 | from unitpy.Before import Before
|
---|
9 |
|
---|
10 |
|
---|
11 | class Clazz1:
|
---|
12 | @Before()
|
---|
13 | def hello(self):
|
---|
14 | return "ok"
|
---|
15 |
|
---|
16 | @Ignore()
|
---|
17 | @After()
|
---|
18 | def closeit(self):
|
---|
19 | return "ok"
|
---|
20 |
|
---|
21 |
|
---|
22 |
|
---|
23 |
|
---|
24 | class IgnoreTest(unittest.TestCase):
|
---|
25 | def test1(self):
|
---|
26 | self.assertEqual(False, getIgnored(Clazz1.hello))
|
---|
27 |
|
---|
28 | def test2(self):
|
---|
29 | self.assertEqual(True, getIgnored(Clazz1.closeit))
|
---|
Note:
See
TracBrowser
for help on using the repository browser.