-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewritten python tests with new syntax.
- Loading branch information
1 parent
a32858c
commit c14ae99
Showing
4 changed files
with
34 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
languages/python-3/src/test/java/de/jplag/python3/PyhtonLanguageTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package de.jplag.python3; | ||
|
||
import de.jplag.testutils.LanguageModuleTest; | ||
import de.jplag.testutils.datacollector.TestDataCollector; | ||
import de.jplag.testutils.datacollector.TestSourceIgnoredLinesCollector; | ||
|
||
public class PyhtonLanguageTest extends LanguageModuleTest { | ||
public PyhtonLanguageTest() { | ||
super(new PythonLanguage(), Python3TokenType.class); | ||
} | ||
|
||
@Override | ||
protected void collectTestData(TestDataCollector collector) { | ||
collector.testFile("test_utils.py").testCoverages(); | ||
|
||
collector.testFile("base_features.py", "streams.py").testSourceCoverage(); | ||
|
||
collector.testFile("log.py").testSourceCoverage().testTokenSequence(Python3TokenType.IMPORT, Python3TokenType.ASSIGN, Python3TokenType.ARRAY, | ||
Python3TokenType.APPLY); | ||
|
||
collector.testFile("unicode.py").testSourceCoverage().testTokenSequence(Python3TokenType.ASSIGN); | ||
} | ||
|
||
@Override | ||
protected void configureIgnoredLines(TestSourceIgnoredLinesCollector collector) { | ||
collector.ignoreMultipleLines("\"\"\""); | ||
|
||
collector.ignoreLinesByPrefix("else:"); | ||
collector.ignoreLinesByPrefix("elif"); | ||
collector.ignoreLinesByPrefix("#"); | ||
collector.ignoreLinesByPrefix("pass"); | ||
} | ||
} |
116 changes: 0 additions & 116 deletions
116
languages/python-3/src/test/java/de/jplag/python3/PythonLanguageCoverageTest.java
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
languages/python-3/src/test/java/de/jplag/python3/PythonLanguageSequenceTest.java
This file was deleted.
Oops, something went wrong.