Skip to content

Commit 43bbf72

Browse files
author
Ram Rachum
committed
-
1 parent 6db973f commit 43bbf72

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

garlicsim/test_garlicsim/test_asynchronous_crunching/test_crunchers/test_pi_cloud_cruncher.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@
88

99

1010
def test_pi_cloud_cruncher():
11-
11+
'''Test the `PiCloudCruncher` placeholder.'''
1212
# Allowing either `TypeError` or `NotImplementedError`:
1313
try:
1414
nose.tools.assert_raises(TypeError, PiCloudCruncher)
1515
except Exception:
1616
nose.tools.assert_raises(NotImplementedError, PiCloudCruncher)
1717

1818

19-
from test_garlicsim.test_misc.test_simpack_grokker.simpacks import \
20-
simpack
19+
from test_garlicsim.test_misc.test_simpack_grokker.simpacks import simpack
2120
simpack_grokker = garlicsim.misc.SimpackGrokker(simpack)
2221

2322
availability = \

garlicsim/test_garlicsim/test_asynchronous_crunching/test_endable/test_endable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_endable():
4040
simpacks = import_tools.import_all(simpacks_package).values()
4141

4242
# Making sure that we didn't miss any simpack by counting the number of
43-
# sub-folders in the `simpacks_package` folders:
43+
# sub-folders in the `simpacks` folder:
4444
simpacks_dir = \
4545
os.path.dirname(simpacks_package.__file__)
4646
assert len(path_tools.list_sub_folders(simpacks_dir)) == \

garlicsim/test_garlicsim/test_asynchronous_crunching/test_on_the_fly/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test():
3636
simpacks = import_tools.import_all(simpacks_package).values()
3737

3838
# Making sure that we didn't miss any simpack by counting the number of
39-
# sub-folders in the `simpacks_package` folders:
39+
# sub-folders in the `simpacks` folder:
4040
simpacks_dir = \
4141
os.path.dirname(simpacks_package.__file__)
4242
assert len(path_tools.list_sub_folders(simpacks_dir)) == \

garlicsim/test_garlicsim/test_asynchronous_crunching/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test():
3333
simpacks = import_tools.import_all(simpacks_package).values()
3434

3535
# Making sure that we didn't miss any simpack by counting the number of
36-
# sub-folders in the `simpacks_package` folders:
36+
# sub-folders in the `simpacks` folder:
3737
simpacks_dir = \
3838
os.path.dirname(simpacks_package.__file__)
3939
assert len(path_tools.list_sub_folders(simpacks_dir)) == \

garlicsim/test_garlicsim/test_doc/test_tutorial_2/test.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test():
100100

101101
state_module_path = os.path.join(simpack_path, 'state.py')
102102

103-
check_module_was_copied_with_correct_newlines(
103+
assert_module_was_copied_with_correct_newlines(
104104
state_module_path,
105105
garlicsim.scripts.simpack_template.simpack_name.state
106106
)
@@ -161,8 +161,14 @@ def get_end_balance():
161161
shutil.rmtree(temp_dir)
162162

163163

164-
def check_module_was_copied_with_correct_newlines(destination_path,
165-
source_module):
164+
def assert_module_was_copied_with_correct_newlines(destination_path,
165+
source_module):
166+
'''
167+
Assert `source_module` was copied to `destination_path` with good newlines.
168+
169+
e.g, on Linux the file should use '\n' for newlines, on Windows it should
170+
use '\r\n'.
171+
'''
166172

167173
assert os.path.isfile(destination_path)
168174
assert isinstance(source_module, types.ModuleType)

0 commit comments

Comments
 (0)