summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* test: fix the trailing-space test, and suppress warnings about \<space>Ned Batchelder2021-10-302-12/+18
|
* style: remove implicit string concatenationNed Batchelder2021-10-302-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. and also add trailing commas where needed to remove ambiguity. I used semgrep with this config: ``` rules: - id: implicit-string-concatenation pattern: | "$X" "$Y" languages: - python message: string cat BAD severity: INFO ``` Running it showed this: ``` $ semgrep --config=../lab/string-cat.yml coverage tests doc ci igor.py setup.py __main__.py Running 1 rules... setup.py severity:info rule:lab.implicit-string-concatenation: string cat BAD 128: 'https://tidelift.com/subscription/pkg/pypi-coverage' 129: '?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=pypi' tests/test_api.py severity:info rule:lab.implicit-string-concatenation: string cat BAD 319: "!coverage.py: This is a private format, don't read it directly!" 320: '{"lines":{"/private/tmp/foo.py":[1,5,2,3]}}' tests/test_html.py severity:info rule:lab.implicit-string-concatenation: string cat BAD 614: ('<span class="key">if</span> <span class="num">1</span> ' 615: '<span class="op">&lt;</span> <span class="num">2</span>'), -------------------------------------------------------------------------------- 616: (' <span class="nam">a</span> ' 617: '<span class="op">=</span> <span class="num">3</span>'), -------------------------------------------------------------------------------- 665: ('<span class="key">if</span> <span class="nam">x</span> ' 666: '<span class="op">&lt;</span> <span class="num">2</span>'), -------------------------------------------------------------------------------- 667: (' <span class="nam">a</span> <span class="op">=</span> ' 668: '<span class="num">3</span>'), -------------------------------------------------------------------------------- 949: ('<span class="key">if</span> <span class="num">1</span> ' 950: '<span class="op">&lt;</span> <span class="num">2</span>'), -------------------------------------------------------------------------------- 951: (' <span class="nam">a</span> <span class="op">=</span> ' 952: '<span class="num">3</span>'), ran 1 rules on 134 files: 8 findings ``` This wasn't all of the instances, so I wrote a bug report: https://github.com/returntocorp/semgrep/issues/4184
* deprecated: the annotate command will be removed in a future versionNed Batchelder2021-10-291-1/+6
|
* refactor(test): make re_lines (et al) look like re.searchNed Batchelder2021-10-287-74/+68
| | | | and also replace some calls with just-plain re.search.
* refactor(test): name this gold file properlyNed Batchelder2021-10-282-1/+1
|
* test: add a annotate test, and simplify the logicNed Batchelder2021-10-282-0/+30
|
* feat: html output directory gets a .gitignore file. #1244Ned Batchelder2021-10-271-0/+1
|
* fix(debug): ast_dump failed on a few thingsNed Batchelder2021-10-273-16/+37
|
* refactor(test): re_lines is more useful if it returns a listNed Batchelder2021-10-274-19/+28
|
* feat: xml and json say what they are doing, and -q quiets everything. #1254nedbat/dashqNed Batchelder2021-10-265-16/+59
|
* test: a true unit test for render_reportNed Batchelder2021-10-261-0/+50
|
* refactor: alphabetize the optionsNed Batchelder2021-10-261-53/+53
|
* fix: changes for PyPy3.8Ned Batchelder2021-10-253-1/+4
| | | | | | | | | | - Update tox.ini to let us run against PyPy3.8 - Some 3.8 behavior is (apparently) only on CPython - PyPy3.8 doesn't get along with virtualenv yet (https://github.com/pypa/virtualenv/issues/2182), so use venv instead for our virtualenv tests.
* test: also test goldtest bad xmlNed Batchelder2021-10-252-14/+37
|
* test: finishing covering goldtest.py with test_goldtest.pyNed Batchelder2021-10-244-24/+78
|
* test: test compare() from test/goldtest.pyNed Batchelder2021-10-243-45/+125
|
* refactor(test): os_sep and remove_tree helpersNed Batchelder2021-10-246-24/+30
|
* fix(html): ariaSort isn't supported in Firefox yetNed Batchelder2021-10-233-14/+12
| | | | The HTML report index page wasn't indicating the sort order properly
* chore(test): update gold filesNed Batchelder2021-10-2327-213/+217
|
* test: update gold filesNed Batchelder2021-10-2343-2063/+1890
|
* fix(html): fix a few problems with the html reportNed Batchelder2021-10-233-15/+32
| | | | | | | | | | - highlights weren't showing - anchored lines were not visible - some j/k motions were broken - clicking the big buttons at the top didn't work
* test: sometimes pytest directories have a "popen" componentNed Batchelder2021-10-231-3/+4
| | | | | Those have to be scrubbed too. I'm not sure why it's sometimes there, sometimes not. Maybe xdist?
* refactor: no more need for a search path for static filesNed Batchelder2021-10-231-57/+1
| | | | | | | We used to search an OS-specific directory in addition to our own, specifically so that Debian could use an OS-installed copy of jQuery and its plugins. But we no longer have jQuery or any third-party JavaScript code, so we don't need to search the Debian directories.
* refactor(html): remove all uses of jQuery, only vanilla JS nowSeptatrix2021-10-231-8/+12
| | | | This is squashed from pull request #1248
* refactor(html): a one-header sticky headerNed Batchelder2021-10-231-31/+33
|
* fix(html): scrolling to an anchor ensures the line is visibleNed Batchelder2021-10-201-3/+3
| | | | | | | The sticky header was hiding the line scrolled to the top of the window. Along the way, also changed to use classes on <body> to control the sticky header, and moved the header code into a function.
* fix: avoid measuring generated code. #1160Ned Batchelder2021-10-181-3/+19
|
* test: remove some obsolete HTML scrubsNed Batchelder2021-10-171-5/+0
|
* chore: updated HTML gold filesNed Batchelder2021-10-1738-383/+626
|
* test: don't show these functions when HTML gold files failNed Batchelder2021-10-172-0/+3
|
* test: html scrubs need to account for pytest dir namingNed Batchelder2021-10-171-0/+1
|
* fix(html): adjust some colorsNed Batchelder2021-10-171-8/+8
| | | | | | | | - make the yellow border more visible - make the context-blue less vibrant - all colors are lower-case
* feat(html): sticky header on pyfileNed Batchelder2021-10-171-5/+15
|
* refactor(html): use header/main/footer html5 elementsNed Batchelder2021-10-171-8/+8
|
* test: fix the tests/gold/html/Makefile to copy actual outputNed Batchelder2021-10-171-4/+3
|
* test: improve this one html testNed Batchelder2021-10-171-3/+3
|
* feat: `coverage run` now sets the COVERAGE_RUN environment variableNed Batchelder2021-10-161-1/+16
|
* test: very minor clean upNed Batchelder2021-10-161-1/+4
|
* test: subprocess diagnostic for when we need itNed Batchelder2021-10-161-0/+6
|
* test: we don't need two sys.path restorersNed Batchelder2021-10-143-15/+6
|
* test: parametrize test_pathologically_long_code_objectNed Batchelder2021-10-141-21/+18
| | | | | While experimenting with packing branch ends into one int, this test showed a mistake I had made. Turns out it wasn't an obsolete test after all.
* test: don't use subprocesses where we don't have toNed Batchelder2021-10-133-56/+74
| | | | | | When running tests with `-n 0`, this shaves 4 seconds off the run time. When running the complete test suite with xdist, it takes 2 seconds longer!?
* refactor: use the get_report helperNed Batchelder2021-10-131-6/+1
|
* refactor: no longer need to explicitly omit site-packagesNed Batchelder2021-10-131-15/+0
| | | | 6.x omits site-packages automatically.
* refactor: convert existing imports to start_stop_importNed Batchelder2021-10-131-15/+6
|
* test: we really don't want to hear about imp being deprecatedNed Batchelder2021-10-121-0/+5
|
* test: add a test that self.stdout() works the way it says.Ned Batchelder2021-10-121-0/+9
|
* fix: use human sorting on human-readable thingsNed Batchelder2021-10-122-8/+39
|
* test: lightly test the ast_dump functionNed Batchelder2021-10-121-2/+24
|
* fix: find_writable_pth_directory must expect failure from open()Michał Górny2021-10-121-4/+4
| | | | | | | Fix find_writable_pth_directory() to expect the OSError from the open() call. In general, this is what's going to happen if the file is not writable. The current logic could only be triggered e.g. if the file was writable but the underlying filesystem run out of space.