Skip to content

Commit

Permalink
Deprecated the fix for appveyor/travis thinking Sublime Text
Browse files Browse the repository at this point in the history
is not responding and set the test name pattern to snake case.
  • Loading branch information
evandrocoan committed May 2, 2019
1 parent ccbd581 commit 7fafc94
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
19 changes: 11 additions & 8 deletions tests/test_wrap.py
Expand Up @@ -84,9 +84,6 @@ def setUp(self):
self.skipTest("An test has failed, skipping everything else!")

def test_thing(self):
# Fix appveyor/travis thinking Sublime Text is not responding
sys.stderr.write('%s. %s <%s>' % (self.index + 1, self.filename, self.syntax))
sys.stderr.flush()
# Get individual test substring.
try:
end = self.starts[self.index + 1]
Expand Down Expand Up @@ -177,8 +174,16 @@ def _wrap_with_scratch(self, filename, contents, expected, syntax, settings, f):
window.focus_view(view)
window.run_command('close_file')

test_name = "".join( character for character in filename if character.isalpha() )
_NAME = "Integration{}{:03d}Tests".format( test_name.title(), index )
test_name = []
for character in filename:
if character.isalpha():
test_name.append(character.lower())
else:
test_name.append('_')

test_name = "".join(test_name)
_NAME = "integration_{}_{:d}_tests".format( test_name, index )

IntegrationTests.__name__ = _NAME
IntegrationTests.index = index
IntegrationTests.start = start
Expand All @@ -193,9 +198,7 @@ def _wrap_with_scratch(self, filename, contents, expected, syntax, settings, f):
def load_tests(loader, standard_tests, pattern):
suite = unittest.TestSuite()
# See _NAME above to get the test class name pattern
# suite.addTest( IntegrationTesttex001Tests( 'test_thing' ) )
# suite.addTest( IntegrationTesttxt020Tests( 'test_thing' ) )
suite.addTest( IntegrationSemantictesttex000Tests( 'test_thing' ) )
suite.addTest( integration_test_txt_15_tests( 'test_thing' ) )
return suite

# Comment this to run individual Unit Tests
Expand Down
1 change: 1 addition & 0 deletions unittesting.json
@@ -1,6 +1,7 @@
{
"tests_dir" : "tests",
"pattern" : "test_*.py",
// "pattern" : "test_wrap.py",
// "pattern" : "test_semantic_linefeed.py",
"async": true,
"deferred": false,
Expand Down

0 comments on commit 7fafc94

Please sign in to comment.