def test_non_homogeneous(self): x = self.x; y = self.y; z = self.z; f = x**4 + 4*y*z**3 - z**2; self.assertEqual(wieghted_min_degree(f,[2,1,2]),4);
def test_negative_wieghts(self): x = self.x; y = self.y; z = self.z; f = x**4 + 4*y*z**3 - z**2; self.assertEqual(wieghted_min_degree(f,[-1,-1,1]),-4);
def test_zero(self): self.assertEqual(wieghted_min_degree(self.poly_ring.zero(),[1,1,1]),0);