Python: Run tests for fieldflow/test.py

This commit is contained in:
Rasmus Wriedt Larsen
2022-02-01 15:32:07 +01:00
parent 1390f034f3
commit a4bb0cc5d8
2 changed files with 9 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
from testlib import *
# These are defined so that we can evaluate the test code.
NONSOURCE = "not a source"
SOURCE = "source"
@@ -37,12 +43,13 @@ class NestedObj(object):
def getObj(self):
return self.obj
# Actual tests
def setFoo(obj, x):
SINK_F(obj.foo)
obj.foo = x
@expects(2)
def test_example1():
myobj = MyObj("OK")

View File

@@ -57,6 +57,7 @@ if __name__ == "__main__":
check_tests_valid("variable-capture.nonlocal")
check_tests_valid("variable-capture.dict")
check_tests_valid("module-initialization.multiphase")
check_tests_valid("fieldflow.test")
# The below will fail unless we use Python 3.10 or newer.
# check_tests_valid("match.test")