mirror of
				https://github.com/arsenetar/dupeguru.git
				synced 2025-09-11 17:58:17 +00:00 
			
		
		
		
	Fixed failing tests on Windows.
This commit is contained in:
		
							parent
							
								
									75f0ed14aa
								
							
						
					
					
						commit
						26e496a051
					
				| @ -316,7 +316,9 @@ class Results(Markable): | ||||
|         try: | ||||
|             do_write(outfile) | ||||
|         except IOError as e: | ||||
|             if e.errno == 21: # outfile is a directory | ||||
|             # If our IOError is because dest is already a directory, we want to handle that. 21 is | ||||
|             # the code we get on OS X and Linux, 13 is what we get on Windows. | ||||
|             if e.errno in {21, 13}: | ||||
|                 p = str(outfile) | ||||
|                 dirname, basename = op.split(p) | ||||
|                 otherfiles = os.listdir(dirname) | ||||
|  | ||||
| @ -6,6 +6,7 @@ | ||||
| # which should be included with this package. The terms are also available at  | ||||
| # http://www.hardcoded.net/licenses/bsd_license | ||||
| 
 | ||||
| import os.path as op | ||||
| from itertools import combinations | ||||
| 
 | ||||
| from .base import TestApp, NamedObject, with_app, eq_ | ||||
| @ -156,7 +157,7 @@ def app_with_subfolders(): | ||||
| def test_folder_crit_is_sorted(app): | ||||
|     # Folder subcriteria are sorted. | ||||
|     app.select_pri_criterion("Folder") | ||||
|     eq_(app.pdialog.criteria_list[:], ['baz', 'foo', 'foo/bar']) | ||||
|     eq_(app.pdialog.criteria_list[:], ['baz', 'foo', op.join('foo', 'bar')]) | ||||
| 
 | ||||
| @with_app(app_with_subfolders) | ||||
| def test_folder_crit_includes_subfolders(app): | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user