feat!: Removing sandbox folder from platform and installing it from p… (#30402)
* feat!: common/lib/sandbox-packages folder moved to a new library.
This commit is contained in:
26
common/djangoapps/util/tests/test_codejail_includes.py
Normal file
26
common/djangoapps/util/tests/test_codejail_includes.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""
|
||||
Tests for codejail-includes package.
|
||||
"""
|
||||
|
||||
import unittest
|
||||
|
||||
import eia
|
||||
import loncapa
|
||||
from verifiers import draganddrop
|
||||
|
||||
|
||||
class TestCodeJailIncludes(unittest.TestCase):
|
||||
""" tests for codejail includes"""
|
||||
|
||||
def test_loncapa(self):
|
||||
random_integer = loncapa.lc_random(2, 60, 5)
|
||||
assert random_integer <= 60
|
||||
assert random_integer >= 2
|
||||
|
||||
def test_nested_list_and_list1(self):
|
||||
assert draganddrop.PositionsCompare([[1, 2], 40]) == draganddrop.PositionsCompare([1, 3])
|
||||
|
||||
def test_Eia(self):
|
||||
# Test cases. All of these should return True
|
||||
assert eia.iseia(100) # 100 ohm resistor is EIA
|
||||
assert not eia.iseia(101) # 101 is not
|
||||
Reference in New Issue
Block a user