summaryrefslogtreecommitdiff
path: root/test-cli/test/tests/qnand.py
blob: 9f2cd47c3d0a9dc08f1fc5a5ccd2abf0053801e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import unittest
import sh

class Qnand(unittest.TestCase):

    __device = "10M"

    # varlist: device
    def __init__(self, testname, testfunc, varlist):
        super(Qnand, self).__init__(testfunc)

        if "device" in varlist:
            self.__device = varlist["device"]
        else:
            raise Exception('device param inside Qnand must be defined')
        self._testMethodDoc = testname

    def execute(self):
        try:
            sh.nandtest("-m", self.__device)
        except sh.ErrorReturnCode as e:
            self.fail("failed: could not complete nandtest command")