File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -5,22 +5,20 @@ def test_operations():
55 x : S = Symbol ('x' )
66 y : S = Symbol ('y' )
77 z : S = Symbol ('z' )
8-
9- # test expand
108 a : S = (x + y )** S (2 )
119 b : S = (x + y + z )** S (3 )
10+
11+ # test expand
1212 assert (a .expand () == S (2 )* x * y + x ** S (2 ) + y ** S (2 ))
1313 assert (expand (b ) == S (3 )* x * y ** S (2 ) + S (3 )* x * z ** S (2 ) + S (3 )* x ** S (2 )* y + S (3 )* x ** S (2 )* z + \
1414 S (3 )* y * z ** S (2 ) + S (3 )* y ** S (2 )* z + S (6 )* x * y * z + x ** S (3 ) + y ** S (3 ) + z ** S (3 ))
1515 print (a .expand ())
1616 print (expand (b ))
1717
1818 # test diff
19- c : S = (x + y )** S (2 )
20- d : S = (x + y + z )** S (3 )
21- assert (c .diff (x ) == S (2 )* (x + y ))
22- assert (diff (d , x ) == S (3 )* (x + y + z )** S (2 ))
23- print (c .diff (x ))
24- print (diff (d , x ))
19+ assert (a .diff (x ) == S (2 )* (x + y ))
20+ assert (diff (b , x ) == S (3 )* (x + y + z )** S (2 ))
21+ print (a .diff (x ))
22+ print (diff (b , x ))
2523
2624test_operations ()
You can’t perform that action at this time.
0 commit comments