test update
This commit is contained in:
		
							parent
							
								
									69b1dd32a4
								
							
						
					
					
						commit
						0320a0bb87
					
				
					 1 changed files with 28 additions and 1 deletions
				
			
		|  | @ -1,4 +1,7 @@ | ||||||
| from src.settings import Settings | from src.settings import Settings | ||||||
|  | from src.tox import Tox | ||||||
|  | import sys | ||||||
|  | import os | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class TestSettings(): | class TestSettings(): | ||||||
|  | @ -7,3 +10,27 @@ class TestSettings(): | ||||||
|         s = Settings() |         s = Settings() | ||||||
|         assert s['ipv6_enabled'] is not None |         assert s['ipv6_enabled'] is not None | ||||||
|         assert s['notifications'] is not None |         assert s['notifications'] is not None | ||||||
|  | 
 | ||||||
|  |     def test_with_delete(self): | ||||||
|  |         path = Settings.get_default_path() + 'toxygen.json' | ||||||
|  |         os.remove(path) | ||||||
|  |         Settings() | ||||||
|  |         assert os.path.exists(path) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class TestTox(): | ||||||
|  | 
 | ||||||
|  |     def test_creation(self): | ||||||
|  |         try: | ||||||
|  |             tox = Tox('tox_save') | ||||||
|  |             assert tox.tox_options is not None | ||||||
|  |             del tox | ||||||
|  |         except: | ||||||
|  |             assert 0 | ||||||
|  | 
 | ||||||
|  |     def test_init(self): | ||||||
|  |         try: | ||||||
|  |             tox = Tox('tox_save') | ||||||
|  |             assert tox.get_savedata_size() | ||||||
|  |         except: | ||||||
|  |             assert 0 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 ingvar1995
						ingvar1995