mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
<component>
|
||||
<company name="JetBrains s.r.o." url="http://www.jetbrains.com/?fromIDE"/>
|
||||
<version major="3" minor="0" eap="true"/>
|
||||
<build number="__BUILD_NUMBER__" date="__BUILD_DATE__"/>
|
||||
<logo url="/pycharm_logo.png" textcolor="ffffff" progressColor="ffaa16" progressY="230" progressTailIcon="/community_progress_tail.png"/>
|
||||
<about url="/pycharm_about.png" logoX="300" logoY="265" logoW="75" logoH="30" foreground="ffffff" linkColor="fca11a"/>
|
||||
<icon size32="/PyCharm_32.png" size16="/PyCharm_16.png" size32opaque="/PyCharm_32.png" size12="/PyCharm_13.png" ico="PyCharm.ico"/>
|
||||
<package code="__PACKAGE_CODE__"/>
|
||||
<names product="PyCharm" fullname="PyCharm" script="charm"/>
|
||||
<install-over minbuild="0" maxbuild="0" version="1.x"/>
|
||||
|
||||
<welcome-screen logo-url="/pycharm_welcomeScreen.png" caption-url="/welcomeCaption.png" slogan-url="/developSlogan.png"/>
|
||||
|
||||
<third-party url="http://confluence.jetbrains.com/display/PYH/Third-Party+Software+Used+by+PyCharm"/>
|
||||
|
||||
<update-urls logo-url="/Logo_welcomeScreen.png"
|
||||
check="http://www.jetbrains.com/updates/updates.xml"
|
||||
patches="http://download.jetbrains.com/python/"/>
|
||||
|
||||
<feedback eap-url="http://www.jetbrains.com/feedback/feedback.jsp?product=PyCharm&build=$BUILD&timezone=$TIMEZONE&eval=$EVAL"
|
||||
release-url="http://www.jetbrains.com/feedback/feedback.jsp?product=PyCharm&build=$BUILD&timezone=$TIMEZONE&eval=$EVAL"/>
|
||||
<help file="pycharmhelp.jar" root="pycharm"/>
|
||||
</component>
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
def factorial(n):
|
||||
"""Return the factorial of n, an exact integer >= 0.
|
||||
|
||||
If the result is small enough to fit in an int, return an int.
|
||||
Else return a long.
|
||||
|
||||
>>> [factorial(n) for n in range(6)]
|
||||
[1, 1, 2, 6, 24, 120]
|
||||
"""
|
||||
|
||||
import math
|
||||
if not n >= 0:
|
||||
raise ValueError("n must be >= 0")
|
||||
if math.floor(n) != n:
|
||||
raise ValueError("n must be exact integer")
|
||||
if n+1 == n: # catch a value like 1e300
|
||||
raise OverflowError("n too large")
|
||||
result = 1
|
||||
factor = 2
|
||||
while factor <= n:
|
||||
result *= factor
|
||||
factor += 1
|
||||
return result
|
||||
|
||||
class FirstGoodTest:
|
||||
"""
|
||||
>>> [factorial(n) for n in range(6)]
|
||||
[1, 1, 2, 6, 24, 120]
|
||||
"""
|
||||
def test_passes(self):
|
||||
pass
|
||||
|
||||
class SecondGoodTest:
|
||||
def test_passes(self):
|
||||
"""
|
||||
>>> [factorial(n) for n in range(6)]
|
||||
[1, 1, 2, 6, 24, 120]
|
||||
"""
|
||||
pass
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
def factorial(n):
|
||||
"""Return the factorial of n, an exact integer >= 0.
|
||||
|
||||
If the result is small enough to fit in an int, return an int.
|
||||
Else return a long.
|
||||
|
||||
>>> [factorial(n) for n in range(6)]
|
||||
[1, 1, 2, 6, 24, 120]
|
||||
"""
|
||||
|
||||
import math
|
||||
if not n >= 0:
|
||||
raise ValueError("n must be >= 0")
|
||||
if math.floor(n) != n:
|
||||
raise ValueError("n must be exact integer")
|
||||
if n+1 == n: # catch a value like 1e300
|
||||
raise OverflowError("n too large")
|
||||
result = 1
|
||||
factor = 2
|
||||
while factor <= n:
|
||||
result *= factor
|
||||
factor += 1
|
||||
return result
|
||||
|
||||
class FirstGoodTest:
|
||||
"""
|
||||
>>> [factorial(n) for n in range(6)]
|
||||
[1, 1]
|
||||
"""
|
||||
def test_passes(self):
|
||||
pass
|
||||
|
||||
class SecondGoodTest:
|
||||
def test_passes(self):
|
||||
"""
|
||||
>>> [factorial(n) for n in range(6)]
|
||||
[1, 1, 2, 6]
|
||||
"""
|
||||
pass
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
#from unittest import TestCase
|
||||
|
||||
class TestNose:
|
||||
def testOne(self):
|
||||
assert 4 == 2*2
|
||||
|
||||
def testTwo(self):
|
||||
assert True
|
||||
|
||||
def testThree():
|
||||
assert 4 == 2*2
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
#from unittest import TestCase
|
||||
|
||||
class TestNose:
|
||||
def testOne(self):
|
||||
assert 5 == 2*2
|
||||
|
||||
def testTwo(self):
|
||||
assert True
|
||||
|
||||
def testThree():
|
||||
assert 4 == 2*2
|
||||
|
||||
def test_evens():
|
||||
for i in range(0, 5):
|
||||
yield check_even, i, i*3
|
||||
|
||||
def check_even(n, nn):
|
||||
assert n % 2 == 0 or nn % 2 == 0
|
||||
@@ -1,9 +0,0 @@
|
||||
class TestPyTest:
|
||||
def testOne(self):
|
||||
assert 4 == 2*2
|
||||
|
||||
def testTwo(self):
|
||||
assert True
|
||||
|
||||
def testThree():
|
||||
assert 4 == 2*2
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
class TestPyTest:
|
||||
def testOne(self):
|
||||
assert 5 == 2*2
|
||||
|
||||
def testTwo(self):
|
||||
assert True
|
||||
|
||||
def testThree():
|
||||
assert 4 == 2*2
|
||||
|
||||
def test_evens():
|
||||
for i in range(0, 5):
|
||||
yield check_even, i, i*3
|
||||
|
||||
def check_even(n, nn):
|
||||
assert n % 2 == 0 or nn % 2 == 0
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
from unittest import TestCase
|
||||
|
||||
class UTests(TestCase):
|
||||
def testOne(self):
|
||||
self.assertEqual(4, 2*2)
|
||||
|
||||
def testTwo(self):
|
||||
self.assertTrue(False or True)
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
from unittest import TestCase
|
||||
|
||||
class UTests(TestCase):
|
||||
def testOne(self):
|
||||
self.assertEqual(5, 2*2)
|
||||
|
||||
def testTwo(self):
|
||||
self.assertTrue(False)
|
||||
|
||||
def testThree(self):
|
||||
self.assertTrue(True)
|
||||
Reference in New Issue
Block a user