File tree Expand file tree Collapse file tree 4 files changed +70
-1
lines changed Expand file tree Collapse file tree 4 files changed +70
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,21 @@ Change History
3
3
==============
4
4
5
5
6
+ 0.10.2 (TBD)
7
+ ------------
8
+
9
+ TODO:
10
+
11
+ - Fix test failures on Windows: https://github.com/cpburnz/python-pathspec/runs/8192308694?check_suite_focus=true
12
+
13
+ Improvements:
14
+
15
+ - `Issue #58 `_: CI: add GitHub Actions test workflow.
16
+
17
+
18
+ .. _`Issue #58` : https://github.com/cpburnz/python-pathspec/pull/58
19
+
20
+
6
21
0.10.1 (2022-09-02)
7
22
-------------------
8
23
Original file line number Diff line number Diff line change 48
48
"bzakdd <https://github.com/bzakdd>" ,
49
49
]
50
50
__license__ = "MPL 2.0"
51
- __version__ = "0.10.1 "
51
+ __version__ = "0.10.2.dev1 "
Original file line number Diff line number Diff line change @@ -311,3 +311,30 @@ def test_04_issue_62(self):
311
311
'anydir/file.txt' ,
312
312
'product_dir/file.txt' ,
313
313
})
314
+
315
+ def test_05_issue_39 (self ):
316
+ """
317
+ Test excluding files in a directory.
318
+ """
319
+ spec = GitIgnoreSpec .from_lines ([
320
+ '*.log' ,
321
+ '!important/*.log' ,
322
+ 'trace.*' ,
323
+ ])
324
+ files = {
325
+ 'a.log' ,
326
+ 'b.txt' ,
327
+ 'important/d.log' ,
328
+ 'important/e.txt' ,
329
+ 'trace.c' ,
330
+ }
331
+ ignores = set (spec .match_files (files ))
332
+ self .assertEqual (ignores , {
333
+ 'a.log' ,
334
+ 'trace.c' ,
335
+ })
336
+ self .assertEqual (files - ignores , {
337
+ 'b.txt' ,
338
+ 'important/d.log' ,
339
+ 'important/e.txt' ,
340
+ })
Original file line number Diff line number Diff line change @@ -537,3 +537,30 @@ def test_07_issue_62(self):
537
537
self .assertEqual (results , {
538
538
'anydir/file.txt' ,
539
539
})
540
+
541
+ def test_08_issue_39 (self ):
542
+ """
543
+ Test excluding files in a directory.
544
+ """
545
+ spec = PathSpec .from_lines ('gitwildmatch' , [
546
+ '*.log' ,
547
+ '!important/*.log' ,
548
+ 'trace.*' ,
549
+ ])
550
+ files = {
551
+ 'a.log' ,
552
+ 'b.txt' ,
553
+ 'important/d.log' ,
554
+ 'important/e.txt' ,
555
+ 'trace.c' ,
556
+ }
557
+ ignores = set (spec .match_files (files ))
558
+ self .assertEqual (ignores , {
559
+ 'a.log' ,
560
+ 'trace.c' ,
561
+ })
562
+ self .assertEqual (files - ignores , {
563
+ 'b.txt' ,
564
+ 'important/d.log' ,
565
+ 'important/e.txt' ,
566
+ })
You can’t perform that action at this time.
0 commit comments