def test_java_null_is_none(): import java.lang.Integer as Integer x = Integer.getInteger("something_what_does_not_exists") y = Integer.getInteger("something_what_does_not_exists2") z = None if __graalpython__.jython_emulation_enabled: assert x == None assert (x != None) == False assert x is None assert (x is not None) == False assert x == y assert (x != y) == False assert x is y assert (x is not y) == False assert x == z assert (x != z) == False assert x is z assert (x is not z) == False else: assert x == None assert (x != None) == False assert (x is None) == False assert x is not None assert x == y assert (x != y) == False assert x is y assert (x is not y) == False assert x == z assert (x != z) == False assert (x is z) == False assert x is not z
from net.earthcomputer.multiconnect.api import MultiConnectAPI from net.earthcomputer.multiconnect.integrationtest import IntegrationTest from org.apache.commons.lang3 import StringEscapeUtils from testing import * context.releaseLock() # Import tests for dirname, dirs, files in os.walk('tests', followlinks=True): for file in files: if file != '__init__.py' and file.endswith('.py'): sys.path.insert(0, os.path.abspath(dirname)) __import__(file[:-len('.py')], globals=globals()) del sys.path[0] min_protocol = Integer.getInteger('multiconnect.integrationTest.minProtocol', 0) max_protocol = Integer.getInteger('multiconnect.integrationTest.maxProtocol', Integer.MAX_VALUE) for protocol in MultiConnectAPI.instance().getSupportedProtocols(): if protocol.getValue() < min_protocol or protocol.getValue( ) > max_protocol: continue tests = [ test for test in get_all_tests() if test.min_protocol <= protocol.getValue() <= test.max_protocol ] if len(tests) == 0: continue
from java.lang import Boolean from java.lang import System from java.lang import Integer username = System.getProperty("user","weblogic") password = System.getProperty("password","weblogic123") adminHost = System.getProperty("adminHost","localhost") adminPort = System.getProperty("adminPort","7001") protocol = System.getProperty("protocol","t3") url = protocol+"://"+adminHost+":"+adminPort fileCount = Integer.getInteger("fileCount", 5) fileMinSize = Integer.getInteger("fileMinSize", 400) fileName = System.getProperty("fileName","config\\mydomain\\myserver\\myserver.log") fileTimeSpan = Integer.getInteger("fileTimeSpan", 12) log4jEnabled = System.getProperty("log4jEnabled", "true") stdoutSeverity = System.getProperty("stdoutSeverity", "Info") logBRSeverity = System.getProperty("logBRSeverity", "Info") logFileSeverity = System.getProperty("logFileSeverity", "Info") memBufferSeverity = System.getProperty("memBufferSeverity", "Info") memBufferSize = Integer.getInteger("memBufferSize", 400) numOfFilesLimited = System.getProperty("numOfFilesLimited", "true") redirectStdout = System.getProperty("redirectStdout", "true") redirectStdErr = System.getProperty("redirectStdErr", "true") rotateOnStartup = System.getProperty("rotateOnStartup", "false") rotateTime = System.getProperty("rotateTime", "00:10") rotateType = System.getProperty("rotateType", "byTime") print "Connecting to " + url + " as [" + \ username + "," + password + "]" # Connect to the server connect(username,password,url) edit() startEdit()