Added [concentration] quantity, molar units, modified a test that had defined molar units locally, and added tags files to the .gitignore.
This commit is contained in:
		
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -12,3 +12,6 @@ MANIFEST
 | 
			
		||||
 | 
			
		||||
# WebDAV file system cache files
 | 
			
		||||
.DAV/
 | 
			
		||||
 | 
			
		||||
# tags files (from ctags)
 | 
			
		||||
tags
 | 
			
		||||
 
 | 
			
		||||
@@ -72,6 +72,10 @@ cmil = 5.067075e-10 * m ** 2 = circular_mils
 | 
			
		||||
darcy = 9.869233e-13 * m ** 2
 | 
			
		||||
hectare = 100 * are = ha
 | 
			
		||||
 | 
			
		||||
# Concentration
 | 
			
		||||
[concentration] = [substance] / [volume]
 | 
			
		||||
molar = mol / (1e-3 * m ** 3) = M
 | 
			
		||||
 | 
			
		||||
# EM
 | 
			
		||||
esu = 1 * erg**0.5 * centimeter**0.5 = statcoulombs = statC = franklin = Fr
 | 
			
		||||
esu_per_second = 1 * esu / second = statampere
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,6 @@ class TestIssues(QuantityTestCase):
 | 
			
		||||
 | 
			
		||||
    def test_issue29(self):
 | 
			
		||||
        ureg = UnitRegistry()
 | 
			
		||||
        ureg.define('molar = mole / liter = M')
 | 
			
		||||
        t = 4 * ureg('mM')
 | 
			
		||||
        self.assertEqual(t.magnitude, 4)
 | 
			
		||||
        self.assertEqual(t._units, UnitsContainer(millimolar=1))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user