This file contains hidden or 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
from nose.tools import assert_equals, assert_true | |
import sys | |
sys.path.append("./pywps-svn") | |
import pywps | |
def test_no_problems_passing_normal_chars(): | |
wps = pywps.Pywps(pywps.METHOD_GET) | |
wps.parseRequest( | |
'service=WPS&version=1.0.0&' | |
'request=Execute&identifier=stub&' |
This file contains hidden or 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 sys | |
sys.path.append("./pywps-svn") | |
import pywps | |
import pywps.config | |
pywps.config.loadConfiguration('tests/pywps-no-logging.cfg') | |
class TestWps(unittest.TestCase): | |
def test_what_happen_on_process_errors(self): | |
wps = pywps.Pywps(pywps.METHOD_GET) |
This file contains hidden or 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
/* Run with: | |
javac Prova.java && java Prova | |
*/ | |
class Prova { | |
public static void main(String[] args) { | |
StringBuilder o = new StringBuilder("o"); | |
System.out.println("\"pippo\" == \"pippo\" ~~> " + ( "pippo" == "pippo") ); | |
System.out.println("\"pippo\" == \"pipp\" + \"o\" ~~> " + ( "pippo" == "pipp" + "o") ); | |
System.out.println("\"pippo\" == \"pipp\" + o ~~> " + ( "pippo" == "pipp" + o) ); |
This file contains hidden or 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 nose | |
class TestToBeRun: | |
def test_it_should_fail(self): | |
assert False | |
# possibly other test cases that should not be run | |
if __name__ == '__main__': | |
list_of_test_to_be_run=[TestToBeRun,] |
This file contains hidden or 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
pippo |
This file contains hidden or 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
# Copyright: Andrea Francia 2012, lincesed under GPL-v2 | |
from __future__ import martin | |
try: | |
martin.dont_mess_the_timeline() | |
except martin.ParentsDontFallInLoveError, e: | |
(george, lorraine) = e.parents() | |
while 'Enchantment Under The Sea': |
This file contains hidden or 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
# Copyright: (C) Andrea Francia 2012 | |
# License CC BY-SA <http://creativecommons.org/licenses/by-sa/3.0/> | |
from __future__ import martin | |
try: | |
martin.dont_mess_the_continuum() | |
except martin.ParentsDontFallInLoveError, e: | |
(george, lorraine) = e.parents() |
This file contains hidden or 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
- (void)saveScreenshot | |
{ | |
NSString * name = @"ciao"; | |
BOOL includeStatusBar = NO; | |
//Get image with status bar cropped out | |
BOOL isRetina = [[UIScreen mainScreen] scale] != 1.0f; | |
CGFloat StatusBarHeight = isRetina ? 40 : 20; | |
CGImageRef CGImage = UIGetScreenImage(); | |
BOOL isPortrait = UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]); | |
CGRect imageRect; |
This file contains hidden or 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
#[cfg(not(test))] | |
fn main() { | |
use std::io::BufferedReader; | |
use std::io::stdin; | |
let mut stdin = BufferedReader::new(stdin()); | |
match stdin.read_line() { | |
Ok(line) => println!("line:{}", line), | |
Err(io_error) => println!("problem reading line: {}", io_error) | |
} |
This file contains hidden or 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
- (void)testMockery | |
{ | |
Mockery * mockery = [[Mockery alloc]init]; | |
id<AddressSink> sink = [mockery mockWithName:@"sink"]; | |
[sink findAddressWithUUID:@"123"]; | |
XCTAssertEqualObjects([mockery calls:^{ | |
[sink findAddressWithUUID:@"123"]; | |
}], [mockery trackedCalls:sink]); |
OlderNewer