This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE PROCEDURE [dbo].[proc_Database_Size] | |
@DBName VARCHAR(200), | |
@Error VARCHAR(250) OUTPUT | |
AS | |
-- ======================================================== | |
-- Author: Your Name | |
-- Create date: mm/dd/yy | |
-- Description: Retrieves the size of the given database: | |
-- * overall size for all LOG records | |
-- * overall size for all ROWs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Thrift; | |
using Thrift.Transport; | |
using Thrift.Protocol; | |
using Calc.Simple; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
sys.path.append("./gen-py") | |
# Thrift facility | |
from thrift.protocol import TBinaryProtocol | |
from thrift.transport import TTransport | |
from thrift.transport import TSocket | |
from thrift.server import TServer | |
# CalcService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
loader = unittest.TestLoader() | |
suite = loader.discover(start_dir='.', pattern='pyexample_*.py') | |
runner = unittest.TextTestRunner(verbosity=2) | |
result = runner.run(suite) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
class ClassB(unittest.TestCase): | |
def test_add_b(self): | |
self.assertEquals(120, 100 + 20) | |
def test_sub_b(self): | |
self.assertEquals(210, 230 - 20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
class ClassA(unittest.TestCase): | |
def test_add_a(self): | |
self.assertEquals(120, 100 + 20) | |
def test_sub_a(self): | |
self.assertEquals(210, 230 - 20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
import pyexample_6_module_a | |
import pyexample_6_module_b | |
loader = unittest.TestLoader() | |
suite = loader.loadTestsFromModule(pyexample_6_module_a) | |
suite.addTests(loader.loadTestsFromModule(pyexample_6_module_b)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
class BaseTestClass(object): | |
def test_base_1(self): | |
self.assertEquals(210, 110 * 2 - 10) | |
def test_base_2(self): | |
self.assertTrue(False is not None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
class BaseTestClass(unittest.TestCase): | |
def test_base_1(self): | |
self.assertEquals(210, 110 * 2 - 10) | |
def test_base_2(self): | |
self.assertTrue(False is not None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
class BaseTestClass(unittest.TestCase): | |
def test_ok(self): | |
self.assertEquals(210, 110 * 2 - 10) | |
@unittest.skip('not supported') | |
def test_skip(self): | |
self.assertEquals(1000, 10 * 10 * 10) |
NewerOlder