Best Python code snippet using pandera_python
test_project_step_repeat.py
Source:test_project_step_repeat.py
...34 self.assertEqual(repeat.dynamic_value, 15)35 self.assertEqual(repeat.value, 15)36 repeat._remains = 5 # simulate commit load37 self.assertEqual(repeat.value, 5)38 def test_is_complex(self):39 repeat = ProjectStepRepeat(None)40 self.assertFalse(repeat.is_complex())41 repeat = ProjectStepRepeat(5)42 self.assertFalse(repeat.is_complex())43 data = {'exactly': 10}44 repeat = ProjectStepRepeat(data)45 self.assertFalse(repeat.is_complex())46 data = {'exactly': 10, 'no-less-than': 15}47 repeat = ProjectStepRepeat(data)48 self.assertTrue(repeat.is_complex())49 data = {'no-less-than': 15}50 repeat = ProjectStepRepeat(data)51 self.assertTrue(repeat.is_complex())52 # def test_load_stats(self):...
test_lang.py
Source:test_lang.py
...19 def test_is_asian(self):20 self.assertFalse(self.de.is_asian())21 self.assertTrue(self.zh.is_asian())22 self.assertFalse(self.kn.is_asian())23 def test_is_complex(self):24 self.assertFalse(self.de.is_complex())25 self.assertFalse(self.zh.is_complex())26 self.assertTrue(self.kn.is_complex())27 def test_has_custom_font(self):28 self.assertFalse(self.de.has_custom_font())29 self.assertTrue(self.kn.has_custom_font())30 def test_get_custom_font(self):31 self.assertEqual(self.de.get_custom_font(), '')32 self.assertEqual(self.kn.get_custom_font(), 'Gentium')33 def test_to_str(self):34 self.assertEqual(str(self.de), '("de","DE","")')35 self.assertEqual(str(self.zh), '("zh","CN","")')36 self.assertEqual(str(self.kn), '("kn","IN","")')37 def test_to_locale(self):...
test_is_complex.py
Source:test_is_complex.py
1#!/bin/env python2# -*- coding: utf-8 -*-3# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python4"""5test_is_complex6"""7import paddle8import pytest9@pytest.mark.api_base_is_complex_vartype10def test_is_complex0():11 """12 int13 """14 x = paddle.to_tensor([[1, 3], [3, 2], [5, 6]])15 assert not paddle.is_complex(x)16 assert not paddle.Tensor.is_complex(x)17@pytest.mark.api_base_is_complex_parameters18def test_is_complex1():19 """20 float21 """22 x = paddle.rand((4,))23 assert not paddle.is_complex(x)24 assert not paddle.Tensor.is_complex(x)25@pytest.mark.api_base_is_complex_parameters26def test_is_complex2():27 """28 complex29 """30 types = ["complex64", "complex128"]31 z = paddle.rand((3,)) + 1j * paddle.rand((3,))32 for dtype in types:33 z = z.astype(dtype)34 assert paddle.is_complex(z)...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!